mod/v1 (draft): the mod channel and the turn-end mod's frames #16

Open
caoer115 wants to merge 18 commits from agent/83f24248-mod-v1 into main
Owner

Draft of mod/v1.md (status: draft; no frozen.lock.md rows): the mod seam at ccc-statusd 0cba578c (branch agent/83f24248-turn-end-mod).

  • § attach — mod_attach (v, session_id, pid, subset within turn-end/forks/subagent), the daemon's checks in order and each refusal's text, the accept, the channel's life.
  • § bridge — cccd mod-bridge attach (attaches again after a daemon restart, ends when its seat is gone, stops on a refusal) and cccd mod-bridge send; how the turn-end mod runs one bridge per session id, a /clear or resume included.
  • § routing — deliver() sends fork_request, cancel_fork, subagent_request and memory_state to the channel ahead of the held connection, with the same afterRoutedDelivery bookkeeping; what happens with no channel.
  • § frames, § forks, § subagents — the four frames the mod sends back, turn_end kept on the held connection, the debounce, the fork and its turn cap (turn-end-cap), the subagent spawn and its report.
  • § evidence — the named tests at 0cba578c, and what has no test.

Every claim is cited file:line at 0cba578c; the fields of the frames themselves stay in client/v1, the one-shot rules in oneshot/v1.

Draft of `mod/v1.md` (status: draft; no frozen.lock.md rows): the mod seam at ccc-statusd 0cba578c (branch agent/83f24248-turn-end-mod). - § attach — `mod_attach` (`v`, `session_id`, `pid`, `subset` within turn-end/forks/subagent), the daemon's checks in order and each refusal's text, the accept, the channel's life. - § bridge — `cccd mod-bridge attach` (attaches again after a daemon restart, ends when its seat is gone, stops on a refusal) and `cccd mod-bridge send`; how the turn-end mod runs one bridge per session id, a `/clear` or resume included. - § routing — `deliver()` sends `fork_request`, `cancel_fork`, `subagent_request` and `memory_state` to the channel ahead of the held connection, with the same `afterRoutedDelivery` bookkeeping; what happens with no channel. - § frames, § forks, § subagents — the four frames the mod sends back, `turn_end` kept on the held connection, the debounce, the fork and its turn cap (turn-end-cap), the subagent spawn and its report. - § evidence — the named tests at 0cba578c, and what has no test. Every claim is cited file:line at 0cba578c; the fields of the frames themselves stay in client/v1, the one-shot rules in oneshot/v1.
mod/v1: draft — the mod channel, its routing and the turn-end mod's frames (ccc-statusd 0cba578c)
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
c426f52f37
mod/v1: review pass 1 — re-pin at ccc-statusd 5a08b77e
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
64904c1931
- kinds: only claude-patched seats load the mods (ucc-<profile>, ucc-auto,
  ucc-sdk exec the patched native with --plugin-dir per mod); a live one-shot
  registration (claude-stock, a native kind) gets no channel.
- attach: new check row, after the held-by-another rule: a live stock seat's
  session is refused; a stock register ends a channel that attached first;
  the accept is written before the channel is recorded (the channel's first
  line); an accept that cannot be written attaches nothing.
- frames: a one-shot turn_end is dropped for a live stock seat and when the
  held connection declares turn-end; the mod awaits its turn_end send inside
  turn.complete, 2 s at most; cwd is $.session.root().
- forks: no fork and no answer before a main turn completed in the process
  (or since /clear or resume); tool.check allow for the mod's own forks.
- bridge: restart pause 1 s doubling to 30 s, back to 1 s on an accept.
- evidence: the three new daemon tests and the register.test.ts tests as
  named; frames.test.ts has seven tests; the untested list updated; the
  recorded traffic stated as recorded at 6da1afe3.
- every file:line and the source line at 5a08b77e (internal/core/,
  internal/modbridge/admit.go).
Merge remote-tracking branch 'origin/main' into agent/80888ab7-mod-v1
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
992f56e441
mod/v1: contract review pass 1 of #16 — wording (M1, M2, M3, M4, M5 erratum, L1-L6) and citations re-pinned at ccc-statusd 13d7ba27
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
ci/woodpecker/pr/woodpecker Pipeline is pending
b39ece9000
M1: the held subagent_request replays at turn_stop and turn_end, a spent one is reported lost, its sender hears nothing more.
M2: a claude-patched seat that loads no mod has none of the three families; uhappy local mode loads the mods, happy remote mode and a native started otherwise do not.
M3: an interactive seat reloads a changed mod; installs copy the mods to a per-install folder a running seat keeps.
M4: a fork's ask becomes an allow; rule and hook denies stand, and a settings deny rule is the named difference from the injection.
M5: client/v1 erratum extended to § extensions.
L1-L6 as the review gives them; L3 names what changed since the 6da1afe3 traffic run. H1's sentence in § subagents waits for its measurement.
client/v1 erratum: also § messages and § client messages, the rows of the moved families (contract review pass 1 of #16, Not checked item 10)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
24920a952c
mod/v1: held subagent_requests follow a session rotation (contract review pass 1 of #16, Not checked 6); citations re-pinned at ccc-statusd 0f718cf4
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
a03f4b9f1f
mod/v1 + client/v1 erratum: contract review pass 2 of #16 (leader 69f2ce94's rulings)
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
6f92805da9
- M1: the client/v1 erratum adds § messages' two paragraphs (the four
  families on the mod channel, with session_id and no internal_id, whether
  or not a held connection exists; the injection drops them) and § window
  (claude-patched registers the narrowed subset).
- M2: § kinds states the loading by mechanism — a seat loads the mods only
  when its launcher passes --plugin-dir — and names ucc's install.sh beside
  the get-ucc wrappers (cited at ucc PR #57's head 04d0390 until it merges;
  0e27095 passes none); the erratum names the mechanism, not a launcher list.
- M3: measured, no reload (§ evidence, shared folder, run b13eab66 m3
  run-3): another seat's types/ write and same-bytes rewrites of tests/ and
  of the loaded register.js reload nothing; a changed loaded file reloads
  every seat on the folder. § bridge says so; its old "even with the same
  bytes" is narrowed to what was measured (B3's cp -R also rewrote
  plugin.json and hooks.json; which write reloaded is unmeasured).
- L1, L2, L3: the allow's limits, the settings-deny difference for the
  subagent, the report's origin and idle start.
- L4: § routing states the hold's re-check (ccc-statusd L4 code fix).
- L5: the no-snapshot path and the engine's own copy replacement.
- L6: § attach's withdrawal sentences after the attach replay; --seat-pid
  for a non-ancestor; a second attach's refusal is tested.

New ccc-statusd lines (subagenthold.go:309-334, the L4 test) are cited at
the #983 head that carries the fix; the whole file re-pins at #983's merge.
mod/v1: ucc install.sh citation is a placeholder until the ucc release line's mods change has a sha (leader 69f2ce94: #983 stays off main until ucc releases carry mods)
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
a33ae6db9a
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin agent/83f24248-mod-v1:agent/83f24248-mod-v1
git switch agent/83f24248-mod-v1

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff agent/83f24248-mod-v1
git switch agent/83f24248-mod-v1
git rebase main
git switch main
git merge --ff-only agent/83f24248-mod-v1
git switch agent/83f24248-mod-v1
git rebase main
git switch main
git merge --no-ff agent/83f24248-mod-v1
git switch main
git merge --squash agent/83f24248-mod-v1
git switch main
git merge --ff-only agent/83f24248-mod-v1
git switch main
git merge agent/83f24248-mod-v1
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
caoer115/contracts!16
No description provided.