Skip to content

A join can collect the files its branches produced - #36

Merged
gedaiu merged 2 commits into
mainfrom
feat/collect-files
Oct 8, 2026
Merged

gedaiu merged 2 commits into
mainfrom
feat/collect-files

Conversation

@gedaiu

@gedaiu gedaiu commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Why

#35 let a join collect what its branches produced, but only values. An agent branch hands back a file far more easily than a value, which has to ride inside its one-line result marker as JSON inside a string. Lore's section pods are agents, so the join could not collect what they write.

What Changed

  • A collect need now reads a branch's file output from the blob store when the join opens, and puts its text (UTF-8) in the JSON array, in branch order. A value still goes in as it is. The kind of each output comes from the station the branch ran, by its hash.
  • Line validation accepts a collected name that a fan-out body produces as a file as well as a value (it still refuses a name no body produces, or one that more than one body produces).
  • docs/entities/assembly-line.md and the fan-out entry in docs/decisions.md say files are collected.

Alternatives Considered

  • Making the agent put its patch in the result marker as a JSON string: nested escaping is the kind of thing a model gets wrong, and the marker is a single line.
  • Having branches push files to the spec branch: concurrent pushes race at the ref and need a rebase loop in every prompt.
  • Collecting blob hashes and leaving the join to fetch them: the join is a service station and would need blob access through the API for what the floor already holds.

ADRs & Architecture

Amends the "Fan-out and join" decision in docs/decisions.md. A file larger than the blob cap cannot exist, but a collected array of large files makes a large need; nothing caps its length yet, as before.

Testing

Test-first: a store scenario where two branches produce files and report in reverse order, and the join opens with their text in branch order (421 store tests pass against Postgres); the validation test now expects the plain wording. Typecheck and lint are clean. Not exercised on a cluster.


🤖 Generated with Claude Code

An agent hands back a file far more easily than a value, which must ride inside
its one-line result marker. A collect need now reads a file output from the blob
store when the join opens, in branch order.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@lore-agent

lore-agent Bot commented Oct 8, 2026

Copy link
Copy Markdown

Lore is reviewing this PR — 9f9e087e-832f-42ef-9714-900ea53ba087.

Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.

@lore-agent lore-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lore review — Approved

Correct implementation of file collection in fan-out joins; one nit on N identical DB calls per branch

Must fix (0) · Consider (0) · Nits (1)

Reviewed by claude-sonnet-4-6

Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.

Posted by floor, visit 1e766e07-72c9-406c-bcda-d9c0cd929dea.

Comment thread packages/store/src/open-visit.ts
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@gedaiu
gedaiu merged commit 7fa1a41 into main Oct 8, 2026
14 checks passed
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