Skip to content

workstreams: sources (file, repo, issue, link, kept), wire v0.4, schema 5 - #2320

Merged
AbirAbbas merged 7 commits into
workstreams/mainfrom
workstreams/wp12-sources
Nov 3, 2026
Merged

AbirAbbas merged 7 commits into
workstreams/mainfrom
workstreams/wp12-sources

Conversation

@AbirAbbas

@AbirAbbas AbirAbbas commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Workstream sources, the Workstreams plan's WP-12 (wire contract v0.4 — Sources).

  • Storage: collections schema 5 adds a workstream_sources table by an additive migration. Schemas 3 and 4 stay readable without writing; the first write creates the table and moves to 5 in one transaction, keeping every row. Schemas 1/2 migrate straight to 5. An engine built before this refuses a schema-5 file with its existing unsupported-database error (nothing lost).
  • Kinds: file (absolute clean path that exists), repo (owner/name or a local checkout folder), issue (owner/name + number), link (http/https only, no userinfo), kept (a record, page, chat message or Factory job of this workstream). Each has a title, read_by_jobs, added_by, added_at. Sources are their own table, never collection members.
  • Wire: source.list, source.add, source.update (title, read_by_jobs, keep a proposal), source.remove; workstream.create takes sources; workstream.changed part sources; hello feature workstream_sources. Strict validation runs before any write: refusals are bad_params and store nothing. Done workstreams refuse source writes with conflict.
  • Agent: workstream_read gains sources / source (bounded reads of the stored path only; final-component links are not followed); propose_source only proposes (proposed: true, read_by_jobs: false), the person keeps or drops.
  • Removing a source never touches the file, folder, page, record, message or job it names.

Validation contract

item tests
(a) each kind added once, round-trips, listed TestWorkstreamSourcesEveryKind, TestWorkstreamSourcesRoundTripAndRemove, TestAppWorkstreamSourcesEveryKindOnWire, conformance source.*
(b) bad paths/URLs → bad_params, nothing stored TestWorkstreamSourcesInvalidInputsStoreNothing, TestAppWorkstreamSourcesRefusalsOnWire, TestAppWorkstreamCreateSourcesPreflight, raw invalid-UTF-8 and URL-bound tests
(c) Read by jobs persists TestWorkstreamSourcesToggleSurvivesReopen, TestAppWorkstreamSourceUpdatesAndDoneOnWire
(d) remove deletes only the row TestWorkstreamSourcesRoundTripAndRemove, TestWorkstreamSourcesKeptOwnershipAndRemoval
(e) create's sources arrive as sources, why untouched TestWorkstreamCreateSourcesAreAtomic, TestAppWorkstreamCreateSourcesPreflight (incl. client_id retry after a source vanished)
(f) sources are not collection members TestWorkstreamSourcesRoundTripAndRemove, TestWorkstreamCreateSourcesAreAtomic
(g) agent proposes only; reads TestWorkstreamProposeSourceToolAndStrictArguments, TestWorkstreamAgentSourceProposalsAndReads, TestWorkstreamAgentSourceFileReadBounds, symlink-replacement tests
(h) Done is read-only TestWorkstreamSourcesDoneAndReopen, TestAppWorkstreamSourceUpdatesAndDoneOnWire
(i) migration keeps every row schema-5 migration tests (from schema 4, 3, 1/2), TestWorkstreamSourceAddMigratesSchemaThreeAndPreservesRows, TestWorkstreamSourcesSchemaFourRequiresItsTable

Left for later

  • Jobs reading sources marked Read by jobs (and not proposed) is the Factory plan step's part (an ask to its owner).
  • No index or search over sources yet; the agent reads them with its tools.

Contract changes

Wire contract v0.4 — Sources (additive; v0.3 is the watching agent). Conformance testdata regenerated.

🤖 Generated with Claude Code

AbirAbbas and others added 5 commits November 3, 2026 10:20
Schema 3 stays readable without writing; the first write creates the table and
moves to 4 in one transaction, keeping every existing row. Schemas 1 and 2
migrate straight to 4.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AbirAbbas
AbirAbbas force-pushed the workstreams/wp12-sources branch from fe958c9 to c979e43 Compare November 3, 2026 15:21
@AbirAbbas AbirAbbas changed the title workstreams: sources (file, repo, issue, link, kept), wire v0.3, schema 4 workstreams: sources (file, repo, issue, link, kept), wire v0.4, schema 5 Nov 3, 2026
…ve to schema 5 and wire v0.4

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AbirAbbas
AbirAbbas merged commit d33dfff into workstreams/main Nov 3, 2026
4 of 8 checks passed
@AbirAbbas
AbirAbbas deleted the workstreams/wp12-sources branch November 3, 2026 16:51
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