GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — dynamic slots: slot gate observe mode, mode setting, old settings mapped (DS3) by scuttletoby · Pull Request #332 · scuttletoby/t3code Conversation
|
| Case | What happens | Test |
|---|---|---|
Settings file from the previous build (no mode) |
enabled: true + numbers: fixed, decides and reads exactly as before. Off: observe, the decision is unchanged |
agentSlotsMode mapping; "fixed mode, old files and unknown modes read nothing"; WaitService and MCP T19 tests with fixed |
Unknown mode from a newer build ("dynamic") |
Kept in the file and through a patch (lenient decode), read as fixed |
agentSlotsMode; contracts "keeps an agentSlots mode of a newer build" |
| Readings fail (throw, EIO) | Rule "unreadable", refuse, level elevated; today's answer stands | "readings that fail or come back half" |
| Readings hang | After 2 s: "slow", unreadable. While 2 reads still hang: "busy", no new read. More than 4 queued: skipped and counted. Decisions never wait | "a hanging machine: never delays…"; "the same decisions… even with a hanging machine" (no clock moved, would hang otherwise) |
Readings come back half (cut meminfo, cut PSI, missing controllers) |
Unreadable or elevated, never "fits" | "readings that fail or come back half" |
| Server restart mid-run with live agents | Hysteresis and counts are memory only: the new gate starts elevated and refuses until 60 s calm; running agents come from the thread list and their scopes, so they still count | "a restart starts elevated"; slotObserve "starts elevated and needs calm" |
| An agent's scope vanishes while the records say it runs | Its piece stays at full cost (#307 item 5) | "a scope that reads as gone keeps its piece" |
| Empty state: no agents, no box yet | No box PSI read (boxPsi: null); the rule's floor applies |
"no live piece of its own: no box pressure is read" |
| Two decisions in the same second | The gate's semaphore orders them; each observation snapshots records before its own decision; observations run one at a time in that order; the second counts the first | "two decisions at once"; "slots on: the gate's own records count a new start, once"; "slot waits: each granted one counts" |
| Observe mode never changes a decision | The same script (3 acquires at limit, a release, two slot-wait grants, an acquire, usage) runs in fixed, observe (healthy), observe (hanging machine) and observe (throwing machine); results are deep-equal | "the same decisions in fixed and observe mode, even with a hanging machine" |
| Runs again (each decision) | Each observation is independent apart from the pressure state and the recent-allow list, both bounded and memory only | — |
General. The mode, the observer and the readings work for anyone on Linux (cgroup v2 or v1, containers), macOS and Windows (readings degrade to "unreadable" where a reading does not exist). No project facts, paths, machines or names; the systemd paths are derived from the user id and the agent slice name at run time.
Built on upstream's AgentScope (one optional method added to the interface, 2 + 7 lines in the two upstream files; seam check passes) and upstream's systemd agent scopes. Everything else lives in fork files (slots/, capacity*, slotObserve, fork settings). The setting goes through the fork settings mechanism (forkSettings.ts, merge-fields patch rule), so no upstream settings file changes.
SlotObserver.test.ts 13 tests (server gate with a fake machine), slotObserve.test.ts 4 (pure), agentSlotsMode mapping 1, contracts mode decoding 1, MCP "off without a mode" 1.mode: "fixed" for "reads nothing"; the default case checks the decision is unchanged. The forkDefaults test lists server.agentSlots as a read-only "not off" row.Red checks (guard removed → test red, then restored):
| Guard removed | Red test |
|---|---|
| Off without mode = observe, on without mode = fixed | agentSlotsMode mapping; "fixed mode, old files and unknown modes read nothing" |
| Unknown mode reads as fixed | agentSlotsMode mapping |
| Observation forked, never awaited | "the same decisions in fixed and observe…"; "a hanging machine: never delays…" |
| Restart starts elevated | "a restart starts elevated"; slotObserve "starts elevated" |
| A gone scope keeps its piece | "a scope that reads as gone keeps its piece" |
| Box PSI only with a live piece | "no live piece of its own: no box pressure is read" |
| Recent allows counted while off | "slots off: an allow counts…"; "two decisions at once" |
| No double count when the gate keeps records | "slots on: the gate's own records count a new start, once" |
| Skip past 4 queued | "a hanging machine…" |
| No new read while 2 hang | "a hanging machine…" |
| Allows in one call chain | "slot waits: each granted one counts…"; slotObserve "counts each allow" |
| Fixed mode reads nothing | "fixed mode, old files and unknown modes read nothing" |
cpu.max EOPNOTSUPP is not "no limit" |
fixture "container CPU limit turned off" |
cgroup.controllers EOPNOTSUPP is not "no v2" |
fixture "container, cgroup.controllers turned off" (both fixture suites) |
v1 root memory.stat EOPNOTSUPP is not "no v1" |
fixture "cgroup v1 container, root memory.stat turned off" |
All 15 went red with the guard removed and green again with it back.
Typecheck (contracts, shared, server, web), fmt, lint, knip and the fork seam check pass.
Follow-up, not here: the settings page does not show mode yet (set it in the settings file); D4 decides the user-facing switch since it changes the default again (#201).
🤖 Generated with Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ped (DS3) agentSlots.mode: "fixed" (today, exactly) or "observe" (today's numbers decide; the capacity rule runs beside each slot decision on live readings, forked and time-limited, and records what it would answer in the log and in wait_list's slotRule). Old files map exactly: enabled without mode = fixed; off without mode = observe; unknown = fixed. Fixed mode reads nothing. Also the DS2 follow-ups (#307): EOPNOTSUPP fixtures, offIsNone removed, container notes, and a gone scope keeps its piece while the gate's records say it runs; no box PSI without a live piece. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The settings page sends stored settings back as a patch, so the patch takes any mode text (an unknown one still reads as fixed), and the number-field key helper skips optional keys. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
lens: correctness verdict: SAFE (head 623b7a4) Summary. Observe cannot change a decision. Minor 1: with slots off, an allowed agent that already shows a run is counted twice for
Expected Minor 2: the observer leaves out slots held by delivered slot waits that live in the wait store. Minor 3: the Minor 4 (upstream fit): the two upstream files touched are not pinned in Nit: the observer's work starts on the caller's own stack. State question.
Mutation checks (guard broken → result):
Two single-guard mutants were equivalent, and I replaced them with the stronger M6 and M10 above. Gone → 0 MB owes the same as null. The reset and append guards for own starts each cover for the other. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…ecked (#385) (#426) * fork seam check: refuse a pull request's own malformed list (format only) (#385) A pull request is judged by main's list, so its own list was never parsed before merge. A malformed one (bad JSON, the old plain-number "lost", an unknown kind, or a deleted list) then made every later pull request and fork-follow run exit 3, including the pull request that fixes it. The PR run now parses the head's list when the change edits it (format only, never its rules) and refuses a malformed one with exit 1. parseConfig also refuses unknown top-level keys and unknown seam-entry keys ("//..." keys stay comments), so a misspelt block cannot guard nothing. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fork: give upstream lines back in pending files (#385) From upstream (as fork-follow runs the seam check) these files lost upstream lines that the fork did not need to touch: - OrchestratorMcpService.ts: delegate_task's generator stays hugged by Effect.fn (Effect.scoped as its pipeable on the closing line), so upstream's 141 re-indented lines come back unchanged; the paced target is named pacedTarget so upstream's `target` lines stay. 147 lost lines -> 4. - EffectWorker.ts: the admitted claim is built first, so upstream's pipe chain keeps its indentation. 8 -> 2. - Imports the fork extended now add a line of their own beside upstream's (ChatMarkdown.tsx, cliRelease test; a split that would grow a file on a pull request is left for later), and runtimeLayer.test.ts keeps upstream's import order. No behaviour change. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fork seams: the list fits main from upstream (lost block, ceilings, 3 files) (#385) `fork-seam-check.cjs --from-upstream <base tag> HEAD` (fork-follow's run) refused main. Now it exits 0: - cli/connect.ts and cloud/CloudLink.ts (#313, also before #277) are seam files with their 5 fork lines each; cloud/linkEnvironment.test.ts (#313) is pending (34). - Pending ceilings set to the counts from upstream: raised where #318 and #332 grew a file before #277 set the counts (SettingsPanels, scopedSettings and its test, useScopedSettings, shared/package.json), lowered where the previous commit gave lines back. - A "lost" block in the {"lines", "gone"} form: 34 files, 20 lines that may move unseen (166 in the block #380 proposed). Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…ped (DS3) (#332) * dynamic slots: slot gate observe mode, mode setting, old settings mapped (DS3) agentSlots.mode: "fixed" (today, exactly) or "observe" (today's numbers decide; the capacity rule runs beside each slot decision on live readings, forked and time-limited, and records what it would answer in the log and in wait_list's slotRule). Old files map exactly: enabled without mode = fixed; off without mode = observe; unknown = fixed. Fixed mode reads nothing. Also the DS2 follow-ups (#307): EOPNOTSUPP fixtures, offIsNone removed, container notes, and a gone scope keeps its piece while the gate's records say it runs; no box PSI without a live piece. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(slots): let the web settings typecheck with agentSlots.mode The settings page sends stored settings back as a patch, so the patch takes any mode text (an unknown one still reads as fixed), and the number-field key helper skips optional keys. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…ecked (#385) (#426) * fork seam check: refuse a pull request's own malformed list (format only) (#385) A pull request is judged by main's list, so its own list was never parsed before merge. A malformed one (bad JSON, the old plain-number "lost", an unknown kind, or a deleted list) then made every later pull request and fork-follow run exit 3, including the pull request that fixes it. The PR run now parses the head's list when the change edits it (format only, never its rules) and refuses a malformed one with exit 1. parseConfig also refuses unknown top-level keys and unknown seam-entry keys ("//..." keys stay comments), so a misspelt block cannot guard nothing. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fork: give upstream lines back in pending files (#385) From upstream (as fork-follow runs the seam check) these files lost upstream lines that the fork did not need to touch: - OrchestratorMcpService.ts: delegate_task's generator stays hugged by Effect.fn (Effect.scoped as its pipeable on the closing line), so upstream's 141 re-indented lines come back unchanged; the paced target is named pacedTarget so upstream's `target` lines stay. 147 lost lines -> 4. - EffectWorker.ts: the admitted claim is built first, so upstream's pipe chain keeps its indentation. 8 -> 2. - Imports the fork extended now add a line of their own beside upstream's (cliRelease test; ChatMarkdown.tsx has them from #17 on since the fold for #475; a split that would grow a file on a pull request is left for later), and runtimeLayer.test.ts keeps upstream's import order. No behaviour change. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fork seams: the list fits main from upstream (lost block, ceilings, 3 files) (#385) `fork-seam-check.cjs --from-upstream <base tag> HEAD` (fork-follow's run) refused main. Now it exits 0: - cli/connect.ts and cloud/CloudLink.ts (#313, also before #277) are seam files with their 5 fork lines each; cloud/linkEnvironment.test.ts (#313) is pending (34). - Pending ceilings set to the counts from upstream: raised where #318 and #332 grew a file before #277 set the counts (SettingsPanels, scopedSettings and its test, useScopedSettings, shared/package.json), lowered where the previous commit gave lines back. - A "lost" block in the {"lines", "gone"} form: 34 files, 20 lines that may move unseen (166 in the block #380 proposed). Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Claude Fable 5.2 <[email protected]>
…ped (DS3) (#332) * dynamic slots: slot gate observe mode, mode setting, old settings mapped (DS3) agentSlots.mode: "fixed" (today, exactly) or "observe" (today's numbers decide; the capacity rule runs beside each slot decision on live readings, forked and time-limited, and records what it would answer in the log and in wait_list's slotRule). Old files map exactly: enabled without mode = fixed; off without mode = observe; unknown = fixed. Fixed mode reads nothing. Also the DS2 follow-ups (#307): EOPNOTSUPP fixtures, offIsNone removed, container notes, and a gone scope keeps its piece while the gate's records say it runs; no box PSI without a live piece. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(slots): let the web settings typecheck with agentSlots.mode The settings page sends stored settings back as a patch, so the patch takes any mode text (an unknown one still reads as fixed), and the number-field key helper skips optional keys. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…ecked (#385) (#426) * fork seam check: refuse a pull request's own malformed list (format only) (#385) A pull request is judged by main's list, so its own list was never parsed before merge. A malformed one (bad JSON, the old plain-number "lost", an unknown kind, or a deleted list) then made every later pull request and fork-follow run exit 3, including the pull request that fixes it. The PR run now parses the head's list when the change edits it (format only, never its rules) and refuses a malformed one with exit 1. parseConfig also refuses unknown top-level keys and unknown seam-entry keys ("//..." keys stay comments), so a misspelt block cannot guard nothing. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fork: give upstream lines back in pending files (#385) From upstream (as fork-follow runs the seam check) these files lost upstream lines that the fork did not need to touch: - OrchestratorMcpService.ts: delegate_task's generator stays hugged by Effect.fn (Effect.scoped as its pipeable on the closing line), so upstream's 141 re-indented lines come back unchanged; the paced target is named pacedTarget so upstream's `target` lines stay. 147 lost lines -> 4. - EffectWorker.ts: the admitted claim is built first, so upstream's pipe chain keeps its indentation. 8 -> 2. - Imports the fork extended now add a line of their own beside upstream's (cliRelease test; ChatMarkdown.tsx has them from #17 on since the fold for #475; a split that would grow a file on a pull request is left for later), and runtimeLayer.test.ts keeps upstream's import order. No behaviour change. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fork seams: the list fits main from upstream (lost block, ceilings, 3 files) (#385) `fork-seam-check.cjs --from-upstream <base tag> HEAD` (fork-follow's run) refused main. Now it exits 0: - cli/connect.ts and cloud/CloudLink.ts (#313, also before #277) are seam files with their 5 fork lines each; cloud/linkEnvironment.test.ts (#313) is pending (34). - Pending ceilings set to the counts from upstream: raised where #318 and #332 grew a file before #277 set the counts (SettingsPanels, scopedSettings and its test, useScopedSettings, shared/package.json), lowered where the previous commit gave lines back. - A "lost" block in the {"lines", "gone"} form: 34 files, 20 lines that may move unseen (166 in the block #380 proposed). Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Claude Fable 5.2 <[email protected]>
…ped (DS3) (#332) * dynamic slots: slot gate observe mode, mode setting, old settings mapped (DS3) agentSlots.mode: "fixed" (today, exactly) or "observe" (today's numbers decide; the capacity rule runs beside each slot decision on live readings, forked and time-limited, and records what it would answer in the log and in wait_list's slotRule). Old files map exactly: enabled without mode = fixed; off without mode = observe; unknown = fixed. Fixed mode reads nothing. Also the DS2 follow-ups (#307): EOPNOTSUPP fixtures, offIsNone removed, container notes, and a gone scope keeps its piece while the gate's records say it runs; no box PSI without a live piece. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(slots): let the web settings typecheck with agentSlots.mode The settings page sends stored settings back as a patch, so the patch takes any mode text (an unknown one still reads as fixed), and the number-field key helper skips optional keys. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…ecked (#385) (#426) * fork seam check: refuse a pull request's own malformed list (format only) (#385) A pull request is judged by main's list, so its own list was never parsed before merge. A malformed one (bad JSON, the old plain-number "lost", an unknown kind, or a deleted list) then made every later pull request and fork-follow run exit 3, including the pull request that fixes it. The PR run now parses the head's list when the change edits it (format only, never its rules) and refuses a malformed one with exit 1. parseConfig also refuses unknown top-level keys and unknown seam-entry keys ("//..." keys stay comments), so a misspelt block cannot guard nothing. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fork: give upstream lines back in pending files (#385) From upstream (as fork-follow runs the seam check) these files lost upstream lines that the fork did not need to touch: - OrchestratorMcpService.ts: delegate_task's generator stays hugged by Effect.fn (Effect.scoped as its pipeable on the closing line), so upstream's 141 re-indented lines come back unchanged; the paced target is named pacedTarget so upstream's `target` lines stay. 147 lost lines -> 4. - EffectWorker.ts: the admitted claim is built first, so upstream's pipe chain keeps its indentation. 8 -> 2. - Imports the fork extended now add a line of their own beside upstream's (cliRelease test; ChatMarkdown.tsx has them from #17 on since the fold for #475; a split that would grow a file on a pull request is left for later), and runtimeLayer.test.ts keeps upstream's import order. No behaviour change. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fork seams: the list fits main from upstream (lost block, ceilings, 3 files) (#385) `fork-seam-check.cjs --from-upstream <base tag> HEAD` (fork-follow's run) refused main. Now it exits 0: - cli/connect.ts and cloud/CloudLink.ts (#313, also before #277) are seam files with their 5 fork lines each; cloud/linkEnvironment.test.ts (#313) is pending (34). - Pending ceilings set to the counts from upstream: raised where #318 and #332 grew a file before #277 set the counts (SettingsPanels, scopedSettings and its test, useScopedSettings, shared/package.json), lowered where the previous commit gave lines back. - A "lost" block in the {"lines", "gone"} form: 34 files, 20 lines that may move unseen (166 in the block #380 proposed). Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Claude Fable 5.2 <[email protected]>
…ped (DS3) (#332) * dynamic slots: slot gate observe mode, mode setting, old settings mapped (DS3) agentSlots.mode: "fixed" (today, exactly) or "observe" (today's numbers decide; the capacity rule runs beside each slot decision on live readings, forked and time-limited, and records what it would answer in the log and in wait_list's slotRule). Old files map exactly: enabled without mode = fixed; off without mode = observe; unknown = fixed. Fixed mode reads nothing. Also the DS2 follow-ups (#307): EOPNOTSUPP fixtures, offIsNone removed, container notes, and a gone scope keeps its piece while the gate's records say it runs; no box PSI without a live piece. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(slots): let the web settings typecheck with agentSlots.mode The settings page sends stored settings back as a patch, so the patch takes any mode text (an unknown one still reads as fixed), and the number-field key helper skips optional keys. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…ecked (#385) (#426) * fork seam check: refuse a pull request's own malformed list (format only) (#385) A pull request is judged by main's list, so its own list was never parsed before merge. A malformed one (bad JSON, the old plain-number "lost", an unknown kind, or a deleted list) then made every later pull request and fork-follow run exit 3, including the pull request that fixes it. The PR run now parses the head's list when the change edits it (format only, never its rules) and refuses a malformed one with exit 1. parseConfig also refuses unknown top-level keys and unknown seam-entry keys ("//..." keys stay comments), so a misspelt block cannot guard nothing. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fork: give upstream lines back in pending files (#385) From upstream (as fork-follow runs the seam check) these files lost upstream lines that the fork did not need to touch: - OrchestratorMcpService.ts: delegate_task's generator stays hugged by Effect.fn (Effect.scoped as its pipeable on the closing line), so upstream's 141 re-indented lines come back unchanged; the paced target is named pacedTarget so upstream's `target` lines stay. 147 lost lines -> 4. - EffectWorker.ts: the admitted claim is built first, so upstream's pipe chain keeps its indentation. 8 -> 2. - Imports the fork extended now add a line of their own beside upstream's (cliRelease test; ChatMarkdown.tsx has them from #17 on since the fold for #475; a split that would grow a file on a pull request is left for later), and runtimeLayer.test.ts keeps upstream's import order. No behaviour change. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fork seams: the list fits main from upstream (lost block, ceilings, 3 files) (#385) `fork-seam-check.cjs --from-upstream <base tag> HEAD` (fork-follow's run) refused main. Now it exits 0: - cli/connect.ts and cloud/CloudLink.ts (#313, also before #277) are seam files with their 5 fork lines each; cloud/linkEnvironment.test.ts (#313) is pending (34). - Pending ceilings set to the counts from upstream: raised where #318 and #332 grew a file before #277 set the counts (SettingsPanels, scopedSettings and its test, useScopedSettings, shared/package.json), lowered where the previous commit gave lines back. - A "lost" block in the {"lines", "gone"} form: 34 files, 20 lines that may move unseen (166 in the block #380 proposed). Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Claude Fable 5.2 <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
dynamic slots: DS2 follow-ups (EOPNOTSUPP fixtures, offIsNone, cgroupns=host, piece paths)
There was an error while loading. Please reload this page.