You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(core): Variant PROTOCOLS table reads through the prototype chain — a model package named "constructor" resolves to the Object function #862
packages/core/src/variant.ts:30 reads PROTOCOLS[model.package] where PROTOCOLS (variant.ts:606) is a plain-object Readonly<Record<string, Protocol>> and model.package is externally supplied (model/catalog config). A package named constructor / toString / __proto__ resolves through the prototype chain to an inherited value (truthy) instead of missing, so the if (!protocol) return [] guard at line 31 does not fire and the inherited function is called as a protocol factory.
Found by the #833 prototype-chain class audit (triage, queue task 3141, main 71608cb 2026-10-29). Same class as #774/#791 et al.; this site was not among the ten known instances.
Fix shape
Own-property read, following the pattern already used at the fixed sites: Object.hasOwn(PROTOCOLS, model.package) ? PROTOCOLS[model.package] : undefined — or the shared guard if the #833 guard follow-up lands first. Add a regression test with model.package = "constructor" (and toString) expecting no variants / no throw.
Why handed back: the laptop OpenChamber location is over its practical cap — 18 live sessions (0 busy / 18 idle) against the cap of 12 (Drew 2026-10-27), verified on this run's own /api/session-activity reads over the laptop (two reads ~07:17–07:19 CDT, identical session-id sets; server OpenChamber 2.5.0, serverId LgSj5VlhWhEdG-5AgZ5DNY5twgI_0CGm8HXdpI_SYe8, unchanged since its 05:22:55 CDT restart). 0 free slots, so no session was launched for this task. Idle completed sessions still hold their slots — harvest by the owning lanes remains the unblock.
Pools were OPEN (not the blocker): fresh laptop /api/quota/* read ~07:17 CDT (raw: dispatch-packets/quota-2026-10-29-0717.json.txt) — opencode-go 5h 14.61% (reset 7:47 AM) / weekly 55.21% / monthly 90.09% (monthly ≥85%, named; pool stays open under the used-to-100% rule); meta ok:true 5h 1% (reset 11:22 AM) / weekly 23% (plan "Muse Code High Usage") — Meta OPEN on quota; cline-pass 5h 12% / weekly 73% / monthly 93% (monthly ≥85%, named; no new cline-pass placements per the steward guard); codex weekly 37% on the active credential (final reserve); command-code 5h 22.81% / weekly 25.40%. Saturation is slots only. (OpenRouter monthly remains walled at a known 100%; claude read rate-limited and antigravity/opendesign not configured — those pools blocked only themselves.)
Claimed by Lane A (opencode) — task 3393. Implementing the own-property guard for the PROTOCOLS[model.package] read in packages/core/src/variant.ts, with a regression test for package names constructor/toString.
Session / ID: issue-sweep-rotating run 2026-10-29T12:24Z
Found via: sweep pickup (queue/queued only; dispatcher hand-back 12:20Z said executor-saturated — taking it via the lifecycle protocol §2(c) cancel-out)
Task: Fix the Variant PROTOCOLS prototype-chain read at packages/core/src/variant.ts:30 — own-property read + regression tests for package "constructor"/"toString".
CI state (head d0dd344d84): the rerun unit jobs on run 40874086493 — basic unit (linux) job 123489590581 and basic unit (windows) job 123489590840 — are STILL PENDING under repo-wide CI congestion. Everything else passes: basic typecheck, basic affected packages, check-standards, check-compliance, e2e (linux + windows). No Codex review threads on the PR. The earlier unit failures were only the two known unrelated config-plugin watcher timing flakes.
Change:variant.tsresolve() reads PROTOCOLS[model.package] behind an Object.hasOwn guard, so a package named constructor/toString/__proto__/hasOwnProperty/valueOf misses instead of resolving through the prototype chain to an inherited value called as a protocol factory; regression test added.
Tests: CI all green — basic unit (linux + windows), basic typecheck, basic affected packages, e2e (linux + windows), check-standards, check-compliance.
Activity
developing-today commentedon Oct 29, 2026
OPENCODE-202
dezren39 commentedon Oct 29, 2026
🤖 Dispatcher hand-back — executor-saturated · openchamber-dispatcher run 2026-10-29 07:15 CDT
small_fix, low risk, no flags, effort/xs, timebox 45m) ↔ this issue (fix(core): Variant PROTOCOLS table reads through the prototype chain — a model package named "constructor" resolves to the Object function #862). Packet verified this run: issue OPEN viagh, labels clean (kind/bug, task/small-fix, source/creator, priority/normal, queue/queued, app/core, effort/xs — no held / user/owned / do-not-merge / do-not-auto-edit, no work/*, no queue/claimed); taskqueuedatt 1 on two independent direct Supabase reads; no competing PR for fix(core): Variant PROTOCOLS table reads through the prototype chain — a model package named "constructor" resolves to the Object function #862 (checked viagh, empty result); no live session or dispatch binding for fix(core): Variant PROTOCOLS table reads through the prototype chain — a model package named "constructor" resolves to the Object function #862 (no binding/payload file, no babysitter binding)./api/session-activityreads over the laptop (two reads ~07:17–07:19 CDT, identical session-id sets; server OpenChamber 2.5.0, serverId LgSj5VlhWhEdG-5AgZ5DNY5twgI_0CGm8HXdpI_SYe8, unchanged since its 05:22:55 CDT restart). 0 free slots, so no session was launched for this task. Idle completed sessions still hold their slots — harvest by the owning lanes remains the unblock./api/quota/*read ~07:17 CDT (raw:dispatch-packets/quota-2026-10-29-0717.json.txt) — opencode-go 5h 14.61% (reset 7:47 AM) / weekly 55.21% / monthly 90.09% (monthly ≥85%, named; pool stays open under the used-to-100% rule); meta ok:true 5h 1% (reset 11:22 AM) / weekly 23% (plan "Muse Code High Usage") — Meta OPEN on quota; cline-pass 5h 12% / weekly 73% / monthly 93% (monthly ≥85%, named; no new cline-pass placements per the steward guard); codex weekly 37% on the active credential (final reserve); command-code 5h 22.81% / weekly 25.40%. Saturation is slots only. (OpenRouter monthly remains walled at a known 100%; claude read rate-limited and antigravity/opendesign not configured — those pools blocked only themselves.)queued, attempts 1, visible to the owning lane — there is no targeted claim/park verb for a dispatcher hand-back (the known binding gap, fix(script): stats.ts fetches have no deadline and buffer unbounded .json() bodies — PostHog, npm downloads, and the GitHub releases pager #1337/fix(changelog): read upstream changelog through a 1 MiB capped reader #1272), so no park verb was misfired at the wrong task. This comment is the hand-back record with reason classexecutor-saturated; the next dispatcher run with a free slot should dispatch it (Workhorse →opencode-route/workhorse— route id only, per Drew's 2026-10-29 route-only rule), or a lane may claim it if urgent.dezren39 commentedon Oct 29, 2026
Claimed by Lane A (opencode) — task 3393. Implementing the own-property guard for the
PROTOCOLS[model.package]read inpackages/core/src/variant.ts, with a regression test for package namesconstructor/toString.dezren39 commentedon Oct 29, 2026
🤖 Agent note · picked up
20 remaining items
dezren39 commentedon Oct 29, 2026
🤖 Agent note · parked (CI rerun still pending)
repo-health-opencode-pilot) — lane A shift 2026-10-29 09:07 CDTd0dd344d84): the rerun unit jobs on run 40874086493 — basic unit (linux) job 123489590581 and basic unit (windows) job 123489590840 — are STILL PENDING under repo-wide CI congestion. Everything else passes: basic typecheck, basic affected packages, check-standards, check-compliance, e2e (linux + windows). No Codex review threads on the PR. The earlier unit failures were only the two known unrelated config-plugin watcher timing flakes.dezren39 commentedon Oct 29, 2026
🤖 Agent note · picked up (resumed as shepherd)
repo-health-opencode-pilot), scheduled lane run 2026-10-29 ~14:45Zvariant.tsown-property guard + regression test for prototype-named packages; already implemented by earlier lanes — no re-implementation, no competing PR).d0dd344d84, MERGEABLE/CLEAN, no competing PR (PR feat(core): shared own-property guard + prototype-chain read regression net #883 targets audit(core): shared own-property guard + regression net for prototype-chain dictionary reads (#833 follow-up) #865 and does not touchvariant.ts); noheld/user/owned/do-not-mergerestriction.dezren39 commentedon Oct 29, 2026
🤖 Agent note · done (merged)
repo-health-opencode-pilot), scheduled lane run 2026-10-29 ~14:45Zmain(merge commit26f33f7d13b59d42caf048a5ce620cfcf9f49c7c); issue fix(core): Variant PROTOCOLS table reads through the prototype chain — a model package named "constructor" resolves to the Object function #862 closed (completed) automatically on merge.variant.tsresolve()readsPROTOCOLS[model.package]behind anObject.hasOwnguard, so a package namedconstructor/toString/__proto__/hasOwnProperty/valueOfmisses instead of resolving through the prototype chain to an inherited value called as a protocol factory; regression test added.