Skip to content

Sprint 0 wave 5: session, server, app, agent and config seams, cliprovider split, web L3-L9 - #429

Merged
PHPCraftdream merged 74 commits into
mainfrom
feat/sprint0-w5-pr-20261116
Nov 16, 2026
Merged

PHPCraftdream merged 74 commits into
mainfrom
feat/sprint0-w5-pr-20261116

Conversation

@PHPCraftdream

Copy link
Copy Markdown
Owner

Sprint 0, wave 5

Integration of the lanes accepted in wave 5 (declaration and body oracles checked, serial tests on the dedicated testbed, guards and selftests green). Full fork CI run 43817996669 on 2ad8f3374 is green.

  • Shell: shpolicy (SH2).
  • Session: proctrack leaf (SM1), batch commit admission takes the writer (SM2), shared run-queue fixtures in run/sessiontest (SM4).
  • Server: wire and finalgate leaves (L1), apiauth and listener leaves (L2, L3).
  • App: seams inside package app (0b-a), plus two fixes found at acceptance (runEnv left DB non-nil for a bare App literal; batchOwner was a zero-size struct, so every App shared one registry key).
  • Agent: agentcall contract (SA1), ProviderMaxRetries to agentcall (SA3), coordinator capability bundles (SA2), plus the fix for the bundle that dropped LiveReader.
  • Config: path regrouping (0b-3.2, 0b-3.3), model/merge/envresolve leave the root, datadir and oauth under domains (D2-1, D2-4 clusters 1-2, D2-4a peak).
  • cliprovider: clipmcp, clipproc, clipspec, clipstream, cliptool (CL-A, CL-B, CL-C); 23 elements to 6. Acceptance caught one defect of the move (a lost negation in a moved test) and fixed it.
  • Prompt split (E1); living docs on post-stage-C paths, module registry draft and the frozen-module guard with its selftest, not wired yet (G1-G3).
  • Web: D3 lanes L3 to L9 (backend, app shell, chat trio, Message dissolved, components into ui/, tests/helpers barrel).
  • Ratchets only fall, except deliberate rises with comments (clipstream and apiauth born over the per-directory file limit with moved tests, domains/datadir 9 elements until D2-6, load_providers.go +1 import line).

Not in this PR: config D2-2 (the io layer needs a design amendment), server L4-L7, app D2-1..D2-3, cmd K1/K2, agent SA4, shell SH3/SH4, session MV/EX lanes.

🤖 Generated with Claude Code

PHPCraftdream and others added 30 commits November 15, 2026 16:13
net, keepAlive, queueOnIdle, sitter, telemetry and batch move into
web/src/backend/{ws,keepAlive,queue,sitter,telemetry,batch}; ws.ts, telemetry.ts and
batchWork.ts become index.ts facades. Singletons keep one owner; typecheck and lint green.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ck handlers (D2m lane SH2)

deny_exec.go stays in the facade (its test is welded to the Run seam); twelve names
cross the boundary. Declaration oracle: only the BlockFunc definition, the exported
PanicGuardHandler and a local middleware alias differ.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d web L3

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…inates their process tree

A diagnostic git shim whose last line was exec git "$@" re-executed itself through PATH
forever; Cygwin exec leaves orphans, so taskkill /T could not reach the chain and the
parent bash waited for pipe EOF for 90 minutes. Every external command now gets a Job
Object with an active-process limit (no kill-on-close, daemons still survive a normal
exit); cancel and stop call TerminateJobObject first and fall back to taskkill /T.
Regression tests: self-recursive PATH shim is bounded, cancel and Stop kill orphaned
descendants, a deliberate daemon survives a normal exit, job helper unit tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…omes actions/index.ts (D3 lane L4)

52 actions plus liveWork and wakeSnapshot move under web/src/actions; 35 importers
re-pointed; typecheck and lint green, side-effect theme restore stays in the facade.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Keeps the shell directory at its recorded file count.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
main.tsx, App.tsx, WsConnector.tsx, useWS.ts, env.d.ts and index.css move into
web/src/app; the rsbuild entry follows. Specifier edits only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nes after web L4 and L5

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…n branch"

This reverts commit e036c24, reversing
changes made to 928acd1.
…oot.go

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…me/contract (0b-1 lane SA1)

The call contract (CallOptions, SessionAgentCall, errors, the ready gate, question
stop text, call data conversion) becomes the leaf package agentcall. The package
agent keeps every historical name through contract_bridge.go (aliases, re-exports,
thin delegates) until the dm8 lane requalifies the importers.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…-900 list after SA1

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ints, normalize, mcpdocs, oauthjournal and config_file_identity (0b-3 lane 3.2)

Same-package declaration moves (seam S2); the grouped var block of three
sentinel errors becomes standalone declarations with identical texts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…sys/proctrack (0b-2 lane SM1)

The registries trackedGroups/trackedJobs, the stop sequence and their tests leave
internal/session for the new leaf proctrack (decision B12); procinfo keeps probe,
liveness and kill. procinfo.RegisterTrackedJobTerminator and the init() in
session/track_windows.go are gone: the tracked-job pass is passed per call through
procinfo.KillProcessWithPass. TrackedProcessCount replaces the two OS holds files.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…0b-3.2 regrouping (deliberate, temporary)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… globalpaths, worktreehome and env_overlay (0b-3 lane 3.3)

Same-package pure move (declaration oracle identical, only two import lines
merged): load_paths, load_worktree and load_env become globalpaths.go,
worktreehome.go and env_overlay.go, cachePathFor and canonicalConfigPath join
the path owner.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…and S3)

The wire payload types, converters and snapshot code move into
internal/serve/server/wire, the finalization stream pump into wire/finalgate;
the terminal-gate package variable becomes explicit gate parameters of the
wiring points. Historical names stay reachable through wire_bridge.go, which
the L4-L7 lanes delete.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
PHPCraftdream and others added 28 commits November 15, 2026 22:02
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ext_loading.go (lane E1)

Pure move inside the package: declaration multiset identical, bodies byte-identical, over-900 ratchet row removed and pin 32 -> 31.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ants anchors re-verified (lane G1)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…test, not wired yet (lanes G2, G3)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…draft, frozen-module guard) into the wave 5 integration branch
…ane SM4, S8 amended)

ParallelSlots/LimitParallel, AwaitPump/AwaitPumpFor, TestTimeline and the pump report helpers exist once instead of three, two and two copies; 43 test files rewired, parallel_gate_test.go (fixtures only) deleted. Core-dependent fixtures stay one copy per tree (S8 rule 3). Ratchet: internal/session 125 -> 126 (run/), lock_test.go 985 -> 986 (import line), files 285 -> 284.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…seven sub-directories, shared pieces to ui/shared (lanes L6, L7)

L6: ui/Login, ui/shared, ui/chat/{Chat,ChatInput,ChatToolbar} with their sub-groups; ChatInput.tsx 873 -> 772 lines (composer/chatInputState.ts). L7: components/Message (48 files) -> ui/chat/Message/{message,content,tools,controls,badges,states,subagent} and ui/shared/{markdown,notices,edit}; the Message barrel is deleted. Export oracle empty over all moved files, typecheck, lint:carburetor and node --test (78) green. Ratchet rows for web/src, components/{Chat,ChatInput,ChatToolbar,Message} removed, components lowered.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The mutable retry knob lives with the contract package both sides already import; references become agentcall.ProviderMaxRetries. promptcache.Profiles() stays with DM3 (the package does not exist yet).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…on capability bundles, binding glue gathers in batch_glue.go (lane SA2)

NewCoordinator gains BatchRuntimeCapabilities and SessionExecutionCapabilities and applies them with the existing setters in the old order; the eight post-construction blocks of app_agent_setup.go become two bundle values; the twelve functions asserting *coordinator move whole into batch_glue.go (DM7 moves it on). Ratchet rows lowered.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… capability bundles) into the wave 5 integration branch
…ost its live-node reader

The old InitCoderAgent passed app.batchLiveReader as the fourth argument of BindCoordinatorBatchControls; the BatchRuntimeCapabilities literal omitted the field, so the coordinator was bound with a nil reader and TestRunLoop_AwaitTasks* failed (no max_wait schedule row). Found by the serial app tests on the integration tip.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…yer fields by name

DiskBinding, BuildScope and BuildScopeRetained (the three fields that were unexported diskBinding, buildScope, buildScopeRetained) became exported when the call contract moved to agentcall (SA1), so the reflective fillCallOptions hit its 'teach fillCallOptions its type' fatal and then the copy comparison. They are managed by BindCallDiskProvider and are not part of the per-field copy contract, exactly as when they were unexported. The test prints the filled and skipped field lists on failure (rule 17). The full serial app run at the integration tip found it: SA1 had been accepted with a filtered app run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…providers and ui/sidebar (lanes L8a-L8d)

L8a livework (+batchControl payload/status), L8b models (modelList, scopedModels pickers/rows/types), L8c providers (forms, draft, peakHours rules/policy, mcp), L8d sidebar; web/src/components is gone, web/src has six entries. Export oracles empty for every lane, typecheck, lint:base, lint:carburetor and node --test (78) green. Ratchet rows for web/src/components and its four sub-directories removed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…, 64 specs import from ./helpers (lane L9)

Nine helper files move byte-identically into factories/ (4) and ws/ (5); index.ts only re-exports; 361 import lines change from ./helpers/<name> to ./helpers; e2e/ and real-backend/ untouched. Resolution proven by grep and ls (the specs are outside the unit typecheck; a tsc run over tests/ reports no module error for ./helpers). Ratchet row web/tests/helpers removed. Playwright (whole suite) runs in CI.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…xes) into the wave 5 integration branch

Conflicts: finalization_wiring_test.go (main's subscriber baseline taken before starting the feed, combined with the finalgate stub argument of the wave), web telemetry (main's carburetor failure files land in backend/telemetry, setupTelemetry takes both imports).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… and oauth move under domains (lanes D2-1 and D2-4 clusters 1-2)

D2-1: Config and its model types move to config/model (cfgmodel), merge helpers to model/merge, env resolution to model/envresolve; setDefaults becomes a free function (method on a non-local type is impossible), DockerMCPName and IsDockerMCPEnabled move with the type; facade.go grows by aliases. D2-4: datadir (nine files) and oauth (14 files, 100 importers rewritten) move under config/domains. Cluster 3 (listeners) stopped on upward crossings into the IO layer: D2-2 goes first. Ratchet: internal/config 124 -> 105 entries, 304 -> 278 files; domains/datadir born with 9 elements (deliberate row).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…, gofumpt import order (CI lint of wave 5)

SA1 exported the former unexported fields of SessionAgentCall (nine) and CallOptions (three); unexported fields were never serialized, so they get json:"-" to keep the payloads and json.Marshal(SessionAgentCall{...}) exactly as before (staticcheck SA1026 found BatchQuestion.Binding.Ask, a func, reachable by the marshaller). SA3 left two import blocks unsorted (gofumpt) in agent_compaction_silent.go and serve/cmd/ping.go.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…iptool leave the root (lanes CL-A, CL-B, CL-C)

cliprovider goes from 23 elements to 6 (provider.go plus five sub-packages).
Moves are pure at the package boundary: identifiers cross it exported, bodies
unchanged, except one defect the move introduced and acceptance caught: the
moved TestCodexMCPConfigArgs_UsesRealServerToken lost the negation on its last
assertion (`if !strings.Contains`), so it failed against correct code.
clipstream is born with 7 production and 15 moved test files, so it is
ratcheted at 22 (tests spread at stage F); the cliprovider rows leave both
ratchet lists.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…pproc, clipspec, clipstream, cliptool) into the wave 5 integration branch

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ve, datadir, oauth leave the root) into the wave 5 integration branch

Ratchets re-synced after the merge: internal/config 129 -> 105 elements and 309 -> 278 files,
domains/datadir listed at 9 (falls to <= 7 at D2-6), load_providers.go 915 -> 916 (+1 import line).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ne import block in facade.go)

The CI lint of wave 5 flagged four files: three datadir files imported
config/model (package name cfgmodel) without the alias goimports inserts, and
facade.go carried two import declarations, which goimports merges. goimports -l
over all 607 Go files changed on the branch is now empty.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@PHPCraftdream
PHPCraftdream merged commit 53859fc into main Nov 16, 2026
1 check passed
@PHPCraftdream
PHPCraftdream deleted the feat/sprint0-w5-pr-20261116 branch November 16, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant