Skip to content

LR's 'unknown unit_id' skip label and counter describe out-of-batch ids as unknown — 113 of 210 campaign skips were real dataset units (likely cosmetic: no promotion was lost; 18/18 promotable skips were already reachable) #733

Description

@gadievron

Summary (likely cosmetic)

The llm-reachability skip line and counter describe out-of-batch ids as
unknown: signal #N: unknown unit_id '<id>' … — skipped in batch i/N
and signals_skipped_unknown_unit. But "unknown" here means only "not in
the current sub-batch" — the id is often a perfectly real unit of the same
scan, one batch over. On the campaign corpus, 113 of 210 skips (54%) were
ids that exist in the scan's own dataset. No promotion was lost: all 18
promotable (entry_point/high) skipped units were already reachable or entry
points, so the corpus impact is confined to the misleading label and
counter. The drop itself is defensible — the model never saw that unit's
code in this batch — this issue is about the label's semantics, not an ask
to admit out-of-batch signals.

Mechanism (at ad2bb7e)

  1. core/llm_reachability.py:362-371 — a signal whose unit_id is not in
    valid_unit_ids logs the "unknown unit_id" line and fires
    on_signal_skip(reason="unknown_unit_id", …).
  2. The caller passes valid_unit_ids=batch_ids where
    batch_ids = {u["id"] for u in sub_batch} (:784, :811-812) — the
    CURRENT SUB-BATCH, not the scan's unit set. The prompt projection sends
    only unit_id+code per unit (:171-189), so an out-of-batch id is
    one the model inferred from a call site, not one it was shown — the skip
    is batch-scoped by design of the batching, and the label says "unknown",
    which reads as "not a real unit".
  3. Lineage: closed LLM-reach report gaps: the unknown-unit_id skip line loses kind/confidence and has no counter; entry_points_promoted is not decomposed #602 added the kind/confidence/batch label and the
    counter; closed fix(llm-reach): resume parity — per-unit records under the backend-identity gate (#532) #543's disclosed behavior change says "cross-batch ids
    were hallucination-only inputs"
    — the corpus partition below refutes
    that premise (113/210 were real dataset units).

Executed at ad2bb7e

$ python3 up19_probe.py
signal for a real out-of-batch unit id, kind=entry_point, confidence=high:
  log line: ["signal #0: unknown unit_id 'real.c:helper' (kind='entry_point', confidence='high') — skipped in batch 1/2"]
  skip reason recorded: ['unknown_unit_id']
  the id exists in the scan's dataset: True
returned signals: 0
up19_probe.py — full script
#!/usr/bin/env python3
"""UP19: the LR skip line labels an out-of-batch REAL unit id as 'unknown'.
Run from the OpenAnt checkout root."""
import sys, os, json, tempfile
assert os.path.isfile("libs/openant-core/pyproject.toml"), "run from the repo root"
sys.path.insert(0, "libs/openant-core")
from core.llm_reachability import parse_response

scan_units = ["app.c:main", "real.c:helper", "util.c:f"]        # the scan's dataset
batch_ids  = {"app.c:main", "util.c:f"}                          # the current sub-batch
reply = json.dumps({"signals": [
    {"unit_id": "real.c:helper", "kind": "entry_point", "confidence": "high",
     "reason": "called from main"}]})

log_lines, skips = [], []
sigs = parse_response(reply, valid_unit_ids=batch_ids, on_error=log_lines.append,
                      on_signal_skip=lambda **kw: skips.append(kw["reason"]),
                      batch_label="batch 1/2")
print("signal for a real out-of-batch unit id, kind=entry_point, confidence=high:")
print("  log line:", log_lines)
print("  skip reason recorded:", skips)
print("  the id exists in the scan's dataset:", "real.c:helper" in scan_units)
print("returned signals:", len(sigs))

Campaign receipts (committed run artifacts, not reader-runnable): 210 skips
across the 25 LR-bearing runs — 113 ids exist in the run's own
dataset.json, 97 do not; per-run examples include
fstyp.tproj/fstyp_ntfs.c:main (apple-diskdev) and
notifyd/notifyd.c:main (libnotify, skipped in batches 8/12 and 9/12 —
both real). All 18 promotable (entry_point/high) real skips were ANALYZED
in their runs' results.json with reachable=True (17/18 already
is_entry_point=True) — the negative result this filing's "likely
cosmetic" label rests on.

Falsifier

A promotable (entry_point/high) out-of-batch skip whose unit was NOT
already reachable and ended in pruned_units.json — that upgrades this to
a recall defect. None in 25 runs. Authored at filing time; no falsifier
existed in the source record.

Prior art

Closed #602 (the label/counter's own issue — delivered); closed #543 (the
resume-parity change whose "hallucination-only" premise the partition
corrects). No open issue covers the label semantics.

Fix-direction: neither — observability wording: the line and counter name
what was skipped accurately (e.g. "out-of-batch unit_id"); no finding or
skip decision changes.

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