Repository navigation
Description
Problem
bun run check:proto-reads (the #865 prototype-chain regression gate, run in CI on Linux in .github/workflows/test.yml, "Check prototype-chain reads are dispositioned") fails on current main 580c277358. The gate's allowlist was written against the pre-#878 shape of variant.ts; PR #878 then changed that read to a multiline Object.hasOwn guard, and PR #883 (the #865 gate itself) merged afterwards carrying the now-stale entry. The guarded read is correct — the gate's bookkeeping is what is broken — so every CI run of the test workflow on main fails this step until the allowlist is updated.
Evidence (main 580c277358, verified this run)
packages/core/src/variant.ts:30-37— the current read is multiline:The trimmed hit lineconst protocol = model.package === undefined ? undefined : Object.hasOwn(PROTOCOLS, model.package) ? PROTOCOLS[model.package] : undefined
? PROTOCOLS[model.package](variant.ts:36) matches the gate's P-A pattern (script/check-proto-reads.ts,PATTERNS) and is NOT in the allowlist.script/check-proto-reads.allowlist.txt:50— the only variant.ts entry is the old single-line form:
packages/core/src/variant.ts :: const protocol = model.package === undefined ? undefined : PROTOCOLS[model.package] :: tracked: #862, fix in flight on PR #878; migrate to ownValue when it lands …
That exact line no longer exists in the source, so the entry is stale, and its disposition ("fix in flight on PR fix(core): read Variant PROTOCOLS table with an own-property guard #878") is also out of date: fix(core): read Variant PROTOCOLS table with an own-property guard #878 has merged and the read is now guarded at the site.- Replicated the gate's exact scan/parse/stale/unlisted logic (
scanSource,parseAllowlist,unlistedHits,staleEntriesfromscript/check-proto-reads.ts) overpackages/core/srcat580c277358: 45 hits, 44 allowlist entries, exactly 1 unlisted hit (variant.ts:36 above) and exactly 1 stale entry (the allowlist line above). No other file is affected. - Merge order confirms the cause:
d0dd344d84(Variant own-property guard, PR fix(core): read Variant PROTOCOLS table with an own-property guard #878) landed beforea5c18ea45e/ merge580c277358(PR feat(core): shared own-property guard + prototype-chain read regression net #883, the audit(core): shared own-property guard + regression net for prototype-chain dictionary reads (#833 follow-up) #865 gate), whose allowlist still carried the pre-guard line.
Why it matters
A regression gate that is red on main trains everyone to ignore it — the exact failure mode #865/#833 built it to prevent — and it fails the Linux test workflow step for unrelated PRs until fixed. The fix is bookkeeping only; the underlying prototype-chain read is already correctly guarded.
Acceptance criteria
-
script/check-proto-reads.allowlist.txt: replace the stale variant.ts entry with the current trimmed hit line frompackages/core/src/variant.ts:36, with disposition "guarded: Object.hasOwn ternary at the same site (fix(core): Variant PROTOCOLS table reads through the prototype chain — a model package named "constructor" resolves to the Object function #862)". -
bun run check:proto-readsexits 0 on main ("All 45 prototype-chain read candidates … are dispositioned" or the then-current count). - No source change to
variant.ts(itsObject.hasOwnguard is correct as-is), and no other allowlist entries added, removed, or reworded. - CI
testworkflow's "Check prototype-chain reads are dispositioned" step is green.
Activity
developing-today commentedon Oct 29, 2026
OPENCODE-222
dezren39 commentedon Oct 29, 2026
🤖 Agent note · filed
? PROTOCOLS[model.package], the multiline Object.hasOwn guard from fix(core): read Variant PROTOCOLS table with an own-property guard #878) and 1 stale entry (allowlist.txt:50, the pre-fix(core): read Variant PROTOCOLS table with an own-property guard #878 single-line form, disposition still says "fix(core): read Variant PROTOCOLS table with an own-property guard #878 in flight"). Fix is allowlist bookkeeping only; variant.ts guard is correct.3 remaining items
dezren39 commentedon Oct 29, 2026
🤖 Agent note · parked — CI queued
repo-worker-opencode) · task 3525MERGEABLE/BLOCKEDonly because checks have not run); all jobs stillQUEUEDafter 5 minutes of polling, so the claim is released rather than held.bun run check:proto-readsexit 0 onqueue/3525-896-proto-reads-allowlist, exit 1 onorigin/main(repro) — the one-line allowlist diff is the whole change.dezren39 commentedon Oct 29, 2026
Resumed parked task 3525: PR #897 rechecked fresh — all 4 required checks SUCCESS (basic typecheck, basic affected packages, basic unit linux/windows), check-standards and check-compliance SUCCESS on their latest runs, Codex review completed on head a19a9ae with no findings. Squash-merged #897 (e030d19); #896 closed. The one-line allowlist fix restores
bun run check:proto-readson main.