Repository navigation
app: workstream wire contract v0 (types, handlers, not-yet stubs) - #2263
Merged
Merged
Conversation
The Workstreams plan, WP-0: the 25 workstream, page, record and goahead methods and the workstream.changed event, registered through typed() and delegating to an optional Workstreamer. Hello carries the workstreams feature only when the engine says it serves them, so a build without the store never announces it. PROTOCOL.md indexes every method and the event. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
appBackend implements Workstreamer with stubs that answer unknown_method "workstreams: not implemented yet" and does not serve workstreams, so the feature stays off until the store lands (WP-1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
CI note: every red check is a baseline failure, also red on
The packages this PR adds tests to pass: |
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
The Workstreams plan, WP-0: the v0 wire contract for workstreams, so the engine store (WP-1) and the desktop app's bridge (WP-2) can be built in parallel against it.
internal/appwire/workstreams.go: Go request/result types for 25 methods (workstream.list/get/create/update/mark_done/reopen/plan_get/plan_set,page.list/get/save/create/update/move/delete/history/restore,record.list/propose/keep/drop/supersede,goahead.list/grant/revoke) and theworkstream.changedevent, each method registered throughtyped(...)and delegating to an optionalWorkstreamerinterface. New error codesin_other_workstream(detailWorkstreamTaken) andversion_conflict(detailWorkstreamVersionConflict).workstreamsfeature only when the engine implementsWorkstreamerandServesWorkstreams()is true.cmd/codeaf/appworkstreams.go:appBackendimplements every method with a stub answeringunknown_methodworkstreams: not implemented yet;ServesWorkstreams()is false, so this build never announces the feature. WP-1 fills these in.docs/design/app-v3/PROTOCOL.md: index sections for the four method groups, the event row, and a short "Workstreams (v0 proposal)" section.internal/appwire/server.gogains exactly one line (withWorkstreamsFeature); the event shape and methods register inworkstreams.go'sinit().The contract is a proposal until it is reviewed on 2026-11-03.
Validation contract
TestEveryWorkstreamMethodIsRegistered(everyWorkstreamMethodsname is served, no extraworkstream./page./record./goahead.method, event present) and the existingTestTheProtocolDocumentNamesEveryMethodAndEventTestWorkstreamMethodsAnswerNotYet(over the wire),TestAppWorkstreamsAreNotYetServed(the realappBackend)unknown_methodTestWorkstreamsFeatureFollowsTheEngineTestWorkstreamSchemaNamesEveryMethodgit diff --stat:server.go+1;collections.go,events.go,app.gountouchedStubbed or left
factory_jobref kind withfactory, one-workstream-per-job, events and the feature switch: WP-1.internal/factory/**orcmd/codeaf/appfactory*.gois touched; what workstreams need from the Factory is listed as asks for its owner.Contract changes
None: this PR is the contract.
🤖 Generated with Claude Code