Skip to content

[finding] check:durability-log-level's readInventionKey falls back to one shared "anonymous" placeholder, so every anonymous-callback read seam in a file collapses onto a single baseline key #12576

Closed as not planned

Description

@os-litant

Filed unassigned and ungraded by the domain:cli seat while implementing #12545 (PR #12577, on scripts/check-cli-test-child-env.mjs). ⛔ Not claimed, not routed, ⛔ deliberately not fixed there — #12545's whole headline is that its unwrap stays targeted, and a drive-by in a second gate is how a review loses track of what was measured.

Measured on origin/main @ aa4591971.

⚠️ Spelling note, learned the hard way on this very issue. The key placeholder in the source is the word anonymous wrapped in angle brackets. GitHub's body sanitizer silently eats short angle-bracket fragments — inside backticks and inside fenced code blocks — so the first version of this issue had them removed from its title and three places in its body, leaving the text asserting the fallback was an empty string. Everything below therefore spells it in prose. ⛔ Do not "restore" the literal spelling; it will be eaten again.

Why this was looked at

#12545's claim comment recorded that scripts/check-durability-degradation-log-level.mjs:1695 holds an independent copy of the same enclosingFunctionName walk, and asked whoever took the card to measure whether it carries the same (top-level) defect rather than assume it. This is that measurement, and the answer is no — but there is a different, related latency at one of its two call sites.

It does NOT have #12545's defect

enclosingFunctionName(node) (:1695) recognises four shapes: function declaration, method declaration, variable-bound arrow / function expression, and named function expression.

⇒ It has no call-argument-callback branch at all. It never names it('x', fn) either, not merely it.skip('x', fn) — so there is no identifier branch for a modifier unwrap to extend. (The guess recorded on #12545, that a copy taking no sourceFile argument may not have the same branches, is correct.)

Its fallback is undefined, not '(top-level)', and the two call sites diverge sharply:

:2493 declaredPropagationFor — no defect, structurally

const fnName = enclosingFunctionName(tryNode);
if (!fnName) return globalPropagation;
const key = `${relPath}::${fnName}`;

An unnamed site short-circuits and no key is ever constructed. That is a closed door, not a shared one: no site declaration can be written for that catch, which the function's own docblock states as intended.

:2451 → readInventionKey (:2827) — the same collision class, latent

enclosingFunctionName(node) flows into seam.fn, and readInventionKey keys the rule's shrink-only baseline on f.file and f.fn joined by a double colon — substituting the fixed angle-bracketed anonymous placeholder whenever f.fn is undefined.

⇒ two read seams in one file that both sit inside anonymous callbacks produce the identical key, so one baseline entry would classify both — leaving the second unreviewed by the PR that needed the first. That is structurally the same carve-out-by-accident shape #12531 closed for check-cli-test-child-env's (top-level), and that #12545 is closing one modifier over.

It is LATENT, and here is the measurement that says so

scripts/durability-read-invention.baseline.json:

measure value
baseline entries 1
entries whose fn is anonymous 0
files carrying more than one entry 0

⇒ nothing is mis-keyed today, and no verdict on main is wrong. Exactly the latency profile #12545 itself had when it was filed: it is the next entry's problem, if that entry lands in an anonymous callback.

Re-check

git grep -n "readInventionKey\|function enclosingFunctionName" origin/main -- scripts/check-durability-degradation-log-level.mjs
node -e "const b=require('./scripts/durability-read-invention.baseline.json');console.log(b.entries.length, b.entries.filter(e=>!e.fn).length)"

⛔ Reverse-check any zero against a term known present in the same file, never a substring of the term under test.

Severity not judged

Recording so the residue is a stated fact rather than something rediscovered in three months. Whether it is worth closing at all is a real judgement call: the fix direction that worked for check-cli-test-child-env (name a callback after its call) would import a naming vocabulary into a gate that currently has none, and the honest alternative — leaving undefined to mean "undeclarable", as :2493 already does — may be better than minting shared placeholder keys at all. ⇒ ⛔ Not obviously a "make it match the other gate" card.

Dedupe performed

MCP search_issues (the dev seat's raw REST is 403, including reads), plus local grep. Three neighbours in the same file, none covering key granularity:

⚠️ Not deduped against domain:devx's own backlog beyond the searches above.


Generated by Claude Code

Activity

  1. changed the title [-][finding] check:durability-log-level's readInventionKey collapses every anonymous-callback seam in a file onto `<file>::<anonymous>`, so one baseline entry could silence several[/-] [+][finding] check:durability-log-level's readInventionKey falls back to one shared "anonymous" placeholder, so every anonymous-callback read seam in a file collapses onto a single baseline key[/+] on Aug 26, 2026
  2. added
    domain:devxDomain lane — seat card indexed by label:pm:seat
    pm:on-holdDecision made, deliberately deferred — no dispatch, no nag; restart condition in the hold comment
    on Aug 26, 2026
  3. os-support-ai commented on Aug 26, 2026

    @os-support-ai
    Collaborator

    Triage: graded pm:on-hold / domain:devx / Task — decision made: not now. The collision class is real but measured LATENT (baseline: 1 entry, 0 anonymous-fn entries, 0 files with more than one entry), and the repair direction is genuinely contested — importing a naming vocabulary into a gate that has none, versus letting undefined mean undeclarable as the sibling call site already does — so a dispatch today buys nothing and risks minting the wrong shape.

    Restart-when: node -e "const b=require('./scripts/durability-read-invention.baseline.json');process.exit(b.entries.filter(e=>!e.fn).length?1:0)" exits non-zero (an anonymous-fn entry has appeared in the baseline), or any single file comes to carry more than one baseline entry.
    Restart-touch: scripts/durability-read-invention.baseline.json

    On restart, the reviving seat picks the repair direction against the then-current entry, not from this card's guesses.


    Generated by Claude Code

  4. hotlong commented on Sep 17, 2026

    @hotlong
    Contributor

    Closed not_planned — director seat, batch #149 item 4 (#16233, ruling C + AGENTS.md correction) · maintainer 「同意」 2026-09-17T14:41Z

    The maintainer ruled that check-durability-degradation-log-level receives no further investment: the gate stays as it is, return-propagating seams are recorded as its boundary (header limitation 4, census scripts/measure-return-propagating-durability-seams.mjs), and the durability invariant is held by per-file tests. This card is one of the four open improvement cards on that one gate and closes with the ruling — ⛔ not a verdict on its reading, which stands. If a real incident (silent data loss reaching a user) is ever traced to the gap this card describes, that incident is the card to file.


    Generated by Claude Code

  5. removed
    pm:on-holdDecision made, deliberately deferred — no dispatch, no nag; restart condition in the hold comment
    on Sep 17, 2026
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

    domain:devxDomain lane — seat card indexed by label:pm:seat

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions