Skip to content

Swift lifecycle entry points are LLM-tier-gated with no structural seeding, and the unscoped gets-boundary heuristic over-seeds from comments #729

Description

@gadievron

Summary

Swift application lifecycle entry points (the didFinishLaunching class)
are seeded only by LLM signals promoted at high confidence (a default #345 deliberately pinned after the medium tier
measured 48% precision), because the structural pattern list has no
AppKit/UIKit lifecycle hooks. When a lifecycle seed's signal flips or is not
emitted under prompt drift, the seed prunes with its closure. Separately,
the \bgets\b Ruby stdin heuristic matches the English word in comments of
any language (the lists are unscoped — the code's own comment documents the
accident; live corpus hits exist), an over-seed that costs analysis budget.

Mechanism (at ad2bb7e)

  1. core/llm_reachability.py:1091 — _PROMOTE_ENTRY_POINT_AT_DEFAULT = frozenset({"high"}); the gate at :1175-1181 promotes only signals whose
    confidence is in the configured tier. The tier is operator-configurable
    per run (OPENANT_PROMOTE_ENTRY_POINT_AT, :1075-1090); llm-reachability: the entry-point promotion threshold is a module constant, and the medium tier it discards measured 48% precision (12/25) #345 litigated
    the medium-tier discard (12/25 precision) and pinned the default to high
    pending a second-corpus reproduction — this issue does not ask to widen
    the tier.
  2. utilities/agentic_enhancer/entry_point_detector.py:64-107 — the
    decorator list covers web/CLI idioms and Swift @objc/@IBAction/
    @IBSegueAction, but no @UIApplicationMain,
    applicationDidFinishLaunching-class lifecycle hooks — so a Swift app's
    lifecycle roots exist only as LLM signals, tier-gated.
  3. :147 and :274 carry r'\bgets\b' (a Ruby stdin heuristic); the
    comment at :238-239 states the lists are not language-scoped and names
    the \bgets\b accident. Patterns match raw code, comments included.

Executed at ad2bb7e

$ python3 f12_seeding.py
promotion gate defaults to 'high' only: True
no AppKit/UIKit lifecycle hook in the seed list: True
the Ruby \bgets\b heuristic matches the English word in a Swift comment: True
f12_seeding.py — full script
#!/usr/bin/env python3
"""F12: entry-point promotion honours only the configured tier (default
'high'), the pattern list has no Swift lifecycle hooks, and \\bgets\\b
matches English in comments."""
import sys, os, re
assert os.path.isfile("libs/openant-core/pyproject.toml"), "run from the OpenAnt checkout root"
sys.path.insert(0, "libs/openant-core")
from core.llm_reachability import _PROMOTE_ENTRY_POINT_AT_DEFAULT
from utilities.agentic_enhancer.entry_point_detector import (
    ENTRY_POINT_DECORATORS, USER_INPUT_PATTERNS, MODULE_LEVEL_INPUT_PATTERNS)

print("promotion gate defaults to 'high' only:", _PROMOTE_ENTRY_POINT_AT_DEFAULT == frozenset({"high"}))
pats = "|".join(ENTRY_POINT_DECORATORS + USER_INPUT_PATTERNS + MODULE_LEVEL_INPUT_PATTERNS)
print("no AppKit/UIKit lifecycle hook in the seed list:",
      not re.search(pats, "@UIApplicationMain") and not re.search(pats, "applicationDidFinishLaunching"))
print("the Ruby \\bgets\\b heuristic matches the English word in a Swift comment:",
      re.search(r"\bgets\b", "    // gets the value from the cache") is not None)

Campaign receipt (committed under campaign/fullscan-20260922/, n=1 as the
source record itself concedes): the using-hevc → hevc-ctx pair dropped 16 → 13
units. Of the three dropped lifecycle seeds, one
(Playback.applicationDidFinishLaunching) flipped high → medium and two
(applicationWillTerminate ×2) emitted no entry-point signal at all under
the context-changed prompt; all three then pruned as orphans. Their closures
were already structurally reachable in this pair (closure loss 0) — the
closure mechanism is the general risk, not this receipt's measurement. This
is one data point toward #345's requested second corpus, not a widening
case. The \bgets\b leg has live corpus hits (three comment-word matches in
swift-jpeg units).

Falsifier

Per leg: a Swift app scan whose lifecycle entry points survive a
prompt/context change via structural lifecycle seeding — closes the
lifecycle leg; a comment-only \bgets\b match that no longer seeds —
closes the over-seed leg. Authored at filing time; no falsifier existed in
the source record.

Prior art

#345 (closed — the tier knob and the pinned default; this issue asks for
structural lifecycle seeding so Swift apps do not depend on the tier at all);
the #355 comment trail in the detector documents the unscoped-list accident.

Fix-direction: more findings — lifecycle-rooted closures re-enter analysis
under prompt drift; the comment-word over-seed is a budget item (neither).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions