Repository navigation
feat(contextmd): serve the Great Library pointer at first input and after compaction #311
Description
What: Chromeria adds the budgeted Great Library pointer and its first-input and compaction lifecycle on Claude, Codex, Grok and OpenCode.
Why: The registered Great Library is not discoverable at those native decision boundaries, and serving needs to own its claims, byte budget and evidence.
So what: Build the reviewed serving capability in the exclusive task worktree, run focused/native-boundary proof, and open the task PR for exact-head Sol/Grok implementation review.
Parent
Outcome
The server half of the accepted #34 design: optional configured index pointer, one accurate shared/personal instruction at first input and immediate compaction continuation, UTF-8 run budget and logs, independent OpenCode receipts, durable Grok creation/attach evidence and correct Codex fork inheritance. This advances the Promachos through discoverable shared knowledge. The parent Spec owns the accepted design, user decisions, deployment and twelve live cells.
Acceptance criteria
- The optional config key preserves current loader/matcher behavior and disabled defaults.
- Whole-pointer UTF-8 accounting fits the 8000-byte serving run and records great_library rows.
- First input and compact epochs use the reviewed Claude/Codex/OpenCode/Grok seams.
- OpenCode pointer claims/bytes/candidates cannot be settled or refunded by ordinary context.
- Every adopted Grok session/new has durable installation evidence before ref adoption and charges once before prompt, or fails without dispatch.
- Codex fork inheritance, nested fork/rollback/refork and missing-copy/compaction negatives satisfy the accepted R2 evidence rule.
- Focused state/API/adapter/fence tests and integration proof exercise actual owners; unrelated main changes are preserved.
- PR has both exact-head independent statuses and green checks, with actual main comparison for any claimed pre-existing failure. No version bump or restart.
Design review and scope
Accepted Spec contextmd#34 names Opus, Grok v5 NO BLOCKING FINDINGS and Sol final scoped R2 NO BLOCKING FINDINGS with exact artifact/report digests and user decisions. No new design round. Current base 366f2ff includes merged matcher/flat Library work; implementation preserves it. ContextMD's companion implementation is on base 5dc096cac8c0fecf548aba2b8b1886a12d226118, version 1.0.0.
Upstream first
At implementation start, pingdotgg/t3code main is 7ac952c. Open Great Library Issue search and open contextmd PR search return none. Earlier broader hook/system-context searches are recorded in #34; no upstream pointer replacement exists to port. Shared adapter/orchestration changes remain small hooks into the fork-owned serving capability.
Non-goals
Capture #8, persona/preferences/memory, registration, matcher #243/#52, shown #245, generic #221, loader #41, event reads #256, pointer-trial #43, follow-ups #71/#72/#73 and the separately tracked #310 restore reconciliation, frontend/browser work, deployment/restart and package versions.
Blocked by
None for implementation: design/authority cleared. A supporting running build later gates activation and live proof. The companion ContextMD plugin/config PR consumes this API.
Required proof
The parent Spec's focused serving and native-boundary checks, with commands/results and exact heads on the PR. On bestia use npx -y pnpm@11.10.0 install and npx -y pnpm@11.10.0 exec vp test run . CI owns broad repository coverage; no full local suites. Real OpenCode mixed/native-save/replay and Codex recording-model cases are integration gates, not claimed by handwritten receipt doubles.
Elon record
- Requirements and who asked: User/contextmd#34 requires the server-owned first-input/post-compaction pointer, provider decisions, UTF-8 run budget/log evidence, approved design, reviewed task PRs and authorized main merge.
- Deleted: Upstream replacement guesses, registration, version bumps, restart, other agents' scope, generic framework and nonblocking polish.
- Bottleneck: Implement the accepted owners and run the discriminating actual-boundary checks; design is cleared and supporting builds wait until merge.
- Checked myself: Full accepted Spec/design/reviews, exact source traces and current base diff, clean task branches, upstream searches/main identity, old focused baselines and prototype evidence limits.
Activity
lukemaj commentedon Oct 14, 2026
What: The server candidate is pushed and source-frozen at
20975c00174e24d46c1822d1a4dee3ee7885eef7in replacement PR #327 against main, linked to this T3 task; superseded #322 is closed.Why: The #291 native provider migration and #313 receipt accounting changed the base, so the pointer hooks were rebased and the combined owner behavior was proved again.
So what: The parent binds the existing native jobs to this backend and frozen ContextMD candidate, obtains fresh exact-head Sol/Grok comments/statuses and CI, then owns merge and rollout.
feat/contextmd-34-great-library-pointer-native-main,/home/luke/dev/toolboxmd/chromeria-worktrees/34-great-library-pointer; clean and equal to origin. Current live main/base:555f0a00198b7aba75d8e8ce13af9c7d983712f4. Original task base:366f2fff6f25f47c14ca86163d8ee8e4dd6c0961. Ten owned commits above current base, no merge commits. Prior branchfeat/contextmd-34-great-library-pointer-rebasedstays atc382af92d82d8b905402da0ad1dc07aad5a5cbd7; original branch stays at45e7b22c494fcf681e95a099e533217b8fad7840. No force push, local main checkout/ref mutation or gate exception. The old PRs retain their evidence and replacement links.da7034e..c382af9range onto absorbed main0387459, added a bounded API adaptation checkpoint, then rebased those eight unpublished commits onto the one-forward-commit555f0a0base. Added the combined receipt control and final ownership PR reference. No historical upstream range was carried into the feature patch. Feature diff is 27 files, 3,468 insertions / 117 deletions.packages/provider-core/src/server/ProviderAdapter.ts,packages/provider-acp/src/server/adapter.tsandpackages/provider-acp/src/server/AcpSessionRuntime.ts. Preserve the current effectful factory, service-provided MCP context, AgentScope, thread titles and OOM scope case. New Effect API calls userandomUUIDv4(); strict tilde substitution uses injectedHostProcess.HomeDirectoryand still preserves Python spelling. Tests use current constructor/layer/namespace signatures. These are dependency/caller adaptations, not a new hook or adapter contract design.unknown/no_evidence_sourceand P no shown fact, and proves budgets, claims, candidate states and epochs unchanged. Explicit P release refunds P only; a subsequent settled P stays excluded from generic closures/checker accounting.Shown.ts,Shown.test.ts,ContextmdServing.test.ts,Harnesses.test.ts, ClaudeAdapterV2 and its tests,GLOSSARY.md,docs/map.mdandscripts/fork-check.share byte-identical to555f0a0. All 35 foreign ownership entries equal main; all feat(contextmd): prove native receipt for settled context serves #313 ContextMD inventory fields remain. The existing ContextMD owner watches the renamed files while the ACP adapter's previous primary owner remains unchanged. The fork state algorithm is byte-identical toc382af92d8; no shown extractor, matcher, capture, Library loader or generic restore behavior changed. ships contextmd#34; no Chromeria map part.d2f00a9764f682316f6db36b5a4f33ab60f0de6e: 14 files, 584 tests pass, 100.55 s, using exactnpx -y pnpm@11.10.0 exec vp test run. Paths are fully recorded in PR feat(contextmd): serve budgeted Great Library pointers across native sessions #327 and retainedCOMMANDS.txt: Select, ServingState, GreatLibrary, ContextmdRoute, the untouched feat(contextmd): prove native receipt for settled context serves #313 ContextmdServing/Harnesses/Shown suites, ProviderTurnStartService and its memory case, ProviderSessionManager, CheckpointRollbackService, CheckpointRestoreSafety, AcpAdapterV2 and AcpJsonRpcConnection.npx -y pnpm@11.10.0 exec tsc-rs --noEmit -pforapps/server/tsconfig.json,packages/provider-core/tsconfig.jsonandpackages/provider-acp/tsconfig.json, all exit 0. Scopedvp lintover changed TS/MJS paths against555f0a0exits 0, five warnings in unchanged ACP test code.npx -y pnpm@11.10.0 installexited 0 at the absorbed0387459base; manifests and lockfile are unchanged by feat(contextmd): prove native receipt for settled context serves #313, so the installed setup was retained. Node26.8.2engine/bin warnings did not prevent proof. No package/version bump.20975c0017changes only the ownership reference from feat(contextmd): serve the Great Library pointer across native epochs #322 to feat(contextmd): serve budgeted Great Library pointers across native sessions #327.git diff --exit-code d2f00a9764 HEAD -- apps packages docs/map.md scripts/fork-check.shexits 0. All 34 saved source/evidence hashes match both the tested commit and final head. Tests/type/lint are reused for these identical inputs, not rerun for the reference-only commit. Fresh clean finalbash scripts/fork-check.sh --base 8d11fe1261f0dfd74f58a1b1ae8ad7e400905fcbexits 0 on the full 88-commit stack, 36 feature owners,fork-check: OK.The explicit base is the actual absorbed upstream merge base, not fork main. Full repository coverage belongs to CI./home/luke/scratch/contextmd-34-pointer/server-proof-d2f00a9764/contains exact commands/results, all test/type/lint logs, both clean fork logs, 34 source hashes, range-diff, source/final diffs andFINAL.json. Original current logs are/tmp/TEST-chromeria311-main555-{focused,server-types,core-types,acp-types,lint}.log,/tmp/TEST-chromeria311-main555-d2f00a9-fork-stack.logand/tmp/TEST-chromeria311-main555-20975c0-fork-stack.log.06ea98d. Corrected tests retain missing/failed compact re-serve, clear, multiple compacts, selected earlier boundary, stale version, removed actual emission and inherited-receiver rollback negatives. Old NULL-source rows remain conservative. Original nine-file Fork Stack Model failure at937cbc6430was an own failure and its necessary ownership registrations remain. Rebase API failures were observed and repaired at their owned call/fixture seams without weakened assertions. Earlier proof is archived, superseded by the 584-test/current-base run.61afeed200with frozen ContextMD51acaa8521d5a9b9fabe9671700ba3956f6a9500, reused for metadata-onlyc382af92d8. That remains predecessor evidence because absorption/feat(contextmd): prove native receipt for settled context serves #313 changed current runtime inputs. Current pair native proof is pending with the same parent-owned jobs. Live companion PR Prism guidance: planner reports router defects as model-router Issues #74 still points to exact51acaa8521d5a9b9fabe9671700ba3956f6a9500; its workspace/source/ref was never written here. No fresh native run, model call or scratch-rig write occurred in this continuation.06ea98dcounts[1,1,1,1,1,2]; corrected45e7b22counts all six 1, injected/inherited/compact-injected/inherited outcomes, 650 charged UTF-8 bytes. Real Route/Serving/State, frozen hook1c47c08, Claude2.1.299, SDK fork, one automatic compact, private net/local SSE; parent reports all owned PIDs stopped. Corrected result SHA-256742a7ee1558477d718e82ae91c36ad37b1c12249c218a7e0b841be86bd24602f, undernative-claude-proof/integration/runs/final-45e7b22-1/. This is historical owner/native evidence, not current acceptance.20975c00174e24d46c1822d1a4dee3ee7885eef7: all 27 exact-head check runs complete, 23 success/four skipped. GitHub reportsMERGEABLE/CLEAN, with no independent review status present yet; the parent still owns final admission. All twelve live cells, supporting builds and natural-pressure Grok compaction remain open and parent-owned. No merge, restart, deployment, paid probe, production database/config change, browser/native UI service or new delegation. contextmd serving: reconcile Codex pointer claims after checkpoint restore #310, ContextMD Resume direct-spawn child threads after a usage limit #71/feat(server): direct child threads resume on their own after a usage limit #72/Stale-worker monitor misidentifies Prism jobs by title #73 and all other original exclusions remain outside scope.Actual real-serving fixture paths for the parent's existing native jobs remain unchanged; hashes and
node --checkwere reverified:/tmp/chromeria311-serving-harness.mjs: actual ContextmdRoute/ContextmdServing/ServingState, serving SQLite, real Cue HTTP client with local score stub, isolated projection/config fixtures and bearer-auth shim. SHA-25632387419e5db11392195e8a621a036cd7bc7f718549227d1c72e936ab5eaf4e7./tmp/chromeria311-opencode-proof.mjs: normal native OpenCode mixed reply/save observer. SHA-256edb4ea55f2d9cea2cd8117a511b3f80b5528cb44eadb2df3a9923bc254bb0ba5./tmp/chromeria311-opencode-cases.mjs: save faults, applying barriers, plugin recreation and overflow/replay observers. SHA-2562ae6d912902b434e7812af9ce7fed6068dc41eefd1968f3f8ec6d6cebb7c59cd.The cases runner accepts explicit
normal reverse save4xx missing lost-save late-save lost-applying-user lost-applying-retry restart-applying restart-miss overflow-replayarguments, the eleven historical completed scenarios. Its no-argument default additionally includes inconclusiveoverflow-tail; no pass is claimed for that case. Random native session ids can enter Cue's existing 10% holdout, so require an observed ordinary match in a non-holdout session before judging mixed ownership. Result JSON overwrites per invocation. The old plugin archive at/tmp/chromeria311-companion/contextmd/serve/opencode/contextmd.jsis frozen1c47c08, not the current companion identity; use the parent's exact committed51acaa85source for current proof. No fixture/double alone passes native acceptance.Requirements and who asked: User and accepted contextmd#34 require the bounded pointer, grammar, lifecycle/accounting, Grok fences and fork-only correction; supported Claude traces require causal compact evidence. User requires rebasing only owned commits, bounded renamed seams, preserved #313 behavior, an unchanged gate, no force push and replacement PR; parent owns integration/reviews/rollout.
Deleted: Shared D/P receipts, run-only dedupe, timestamp jitter/blanket SessionStart exemptions, new native hook/adapter/caller plumbing, source-session restore reconciliation, unrelated loaders/matchers/shown work, recurring automation, merge/gate exception, version bump and misleading map assignment.
Bottleneck: Parent's current-pair exact-candidate native receipts and fresh independent reviews; CI passes on the frozen head.
Checked myself: Current package callers/MCP ownership, #313 shared diff and byte preservation, 584 focused tests, three scoped typechecks/lint, source hashes, unchanged fork algorithm, 35-owner equivalence, live refs, preserved prior branches, ten owned commits and the unchanged clean final 88-commit fork gate.
lukemaj commentedon Oct 14, 2026
What: The server slice is merged by PR #327, squash commit
01d7066bb72e195af8c51a6e38aea3aada805d2d.Why: Both required independent reviews succeeded on exact head
20975c0after findings comments, CI is green, and current-pair contract/native proof passed within its stated limits.So what: ContextMD #34 owns the supporting-build gate, hook activation and twelve live cells; it remains open, and this task does not restart Chromeria.
Parent verified the merge state and all27pointer PR files against the reviewed head. Merged main also carries #329 intact, whose complete eight-file diff was inspected without pointer-path or dependency overlap. ContextMD companion #74 merged at09515a4d, exact reviewed tree, with annotated v1.2.0 pushed. Both exact-head review contexts and native evidence are linked from the canonical #34 handoff. No earlier-head verdict or controlled prototype is claimed as a live fleet pass.
Requirements and who asked: User delegated merging the reviewed #34 outcome and requires hook rollout/runbook plus twelve live harness/machine cells.
Deleted: Chrome version bump/restart, approval or check bypass, another design panel and premature #34 closure.
Bottleneck: Supporting running Chromeria builds before pointer configuration, followed by live acceptance.
Checked myself: Forge heads/status creators/comment ordering/checks/merges, complete merged identities and actual current native/SQLite proof; #311 closed and #34 remains open.
Recorded by gpt-6.1-sol, max effort, Codex harness.