Repository navigation
app: the engine keeps only the generic pieces of the Workstreams plan (schema 7) - #2336
Merged
Merged
Conversation
…ps development tables The collections store now writes schema 7: collections and memberships in the generic shape (factory_job refs with their factory, five-column UNIQUE), and nothing else. Versions 1-7 are read as they stand; the first write migrates inside its own transaction. Schemas 1 and 2 are copied into the generic tables; schemas 3-6, written only by development builds, lose their extra tables, indexes and triggers while every collection, membership and ref stays. A failed first write leaves the file as it was; 8+ is refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Workstreams move into the app, so the engine drops everything that existed only for them: the workstream store and page renderer, the wire methods and hello features, the agent's built-in tools and prompt section, the morning wake scheduler and its replay purpose, the conformance fixtures, and the old launch-cleanup hook. Removing the agent door also removes the copy of it that Fresh and Open carried. What stays is generic: collections hold Factory jobs (the resolver moves to appcollections_factory.go under generic names, with its own tests), client tools, and collection-held conversations that survive cleanup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eam entries go The protocol and the collections manual lose the workstream methods, events, features and schemas, and keep the factory_job and client-tools sections. The unreleased workstream entries described features that will not ship from the engine; one entry for the generic pieces replaces them and the client-tools entry. The CI-timeout entry no longer mentions the deleted conformance case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kept conversations Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…as added The first version reused the client-tools entry's wording, so git paired the two files as a rename and the change-entry gate found no added entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Workstreams move into the app (the Workstreams plan, E2). The engine keeps only the generic pieces it gained on this branch and drops everything that existed only for workstreams:
internal/workstream/**(store, page renderer),cmd/codeaf/appworkstreams*.go(wire handlers, agent door, sources, morning-wake scheduler, theWorkstreamJobEventhook),internal/appwire/workstreams*.goand theworkstreams/workstream_sourceshello features,internal/session/workstream_*.goand the agent's built-in workstream tools and prompt section, the conformance fixtures, theworkstream-wakereplay purpose and spend-owner row, the old launch-cleanup hook (v3WorkstreamKeeps), and the agent door that Fresh/Open copied from the launch config (removing the field removes that bug). 139 files.factory_jobrefs,--factory, resolved targets; the resolver moves tocmd/codeaf/appcollections_factory.gounder generic names, with its own tests), client tools (Client tools: a client attaches tools to a conversation; collection-held conversations are kept #2334), collection-held conversations survive cleanup and reopen after a restart (Client tools: a client attaches tools to a conversation; collection-held conversations are kept #2334), thecmd/codeaf25-minute CI timeout and this branch's CI triggers.user_version = 7: collections and memberships in the generic shape, nothing else. Versions 1–7 are read as they stand; the first write migrates inside its own transaction. 1/2 are copied into the generic tables; 3–6 (development builds only) lose their 12 extra tables, 10 indexes and 4 triggers while every collection, membership and ref stays; a former workstream becomes a plain, deletable collection. A failed first write leaves the file as it was; 8+ and foreign files are refused unmodified.factory_joband client tools; the 13 unreleased workstream and client-tools entries become oneaddedentry.Validation contract
git grep -n -i workstream -- . ':!internal/head/toolbelt.go'→ only the twoworkstreams/mainCI trigger lines, the legacy cleanup statement ininternal/workspace/schema7.go, and the frozen schema-6 fixture SQL inschema7_test.go(internal/head/toolbelt.gois older code using the English word)collections_factory_job_test.go,appcollections_factory_test.go(batching, cache, nesting, fallback bounds, target states, panic waiters), the client-tools and collection-keep suites from #2334,schema3_test.gogeneric rebuild testsschema7_test.go: realistic v6 file (every legacy table populated, nested collections, same job in two collections, sequence gaps) read-before-write unchanged, first write → 7 with rows/seq/times/factory/high-water marks kept and legacy objects gone, second write runs no DDL; v2 file; v3–5 shapes; failed first write rolls back; v8 and foreign id refusedTestALandStartsNoAutomaticMaintenance, the twoTestNoRoad…complexity laws,TestProgramHoldClassifiesEveryRegisteredChatTool, the fixed/lean prefix budgets (same byte counts as app/v3), and the flakyTestRenderAdmissionIsBoundedAndReleasedOnSettle; codeaf'sTestRecipeDoorWritesTheWorktreeWhenOnlyTheCheckoutIsHeldis marked already failing on the base. A fresh app/v3 Full check (run 41735053886) fails the same six plusTestRetireWaitsForTheSaveOfTheHostItAskedToGoCompatibility
app/v3 refuses a version-7 file, as it refuses 3–6 today: its gate accepts only 1 and 2, its
ON CONFLICT(collection_id,kind,ref_id,session_id)does not match the five-column UNIQUE, its duplicate copies memberships withoutfactory, and it does not know thefactory_jobkind. Version 7 support therefore needs the Factory-ref code itself and goes in when this branch merges into app/v3.Known flake, not from this branch
TestKnowledgeCapturesSavedTurnsOnlyAfterOptIn(seen failing on #2334): a race in base code.StartBuildenables the memory setting before the transaction that commitscreated_at; in that window consent reads "enabled since epoch", so a queued journal wake can admit the pre-opt-in turn (4 sources instead of 2). No file on this branch touches that path; the fix belongs with the knowledge owners.🤖 Generated with Claude Code