Skip to content

lab/server: Slice 0 contracts and fixtures for the lab server (#131) - #478

Merged
dayfine merged 2 commits into
agentsfrom
agents-lab-server-slice0
Nov 14, 2026
Merged

dayfine merged 2 commits into
agentsfrom
agents-lab-server-slice0

Conversation

@dayfine

@dayfine dayfine commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Base: agents. Implements Slice 0 of the lab-server design in #131 (docs/design/Agent-Integration.md at 9f5fdc7); the diff shows only this change.

The lab server has no frozen contract yet, so Slice 1 (app writer) and Slice 2 (read server) would each invent their own JSON. This adds lab/server/ with version-1 golden examples for app state (Lab/state.json), save facts, the console and save resources, requests, request records, refusals, events and event pages, plus a stdlib parser (pa_lab.contracts) that checks versions, enums, UTC millisecond timestamps, UUIDs and cross-field rules with field-level errors, and keeps unknown fields so goldens round-trip. App-authored documents are embedded whole in the daemon's resources, so authorship is the object boundary; legacy Lab/state twins (one is the real lab-B file) pin how every legacy field maps. Tested with the new unittest suite (19 tests, 56 invalid cases incl. malformed, missing-version and future-version), added to Agents Check; lab/server/README.md lists what Slice 1 must write.

🤖 Generated with Claude Code

https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

Freezes the JSON contracts of the pa-lab console daemon before anything
writes or serves them: app state (Lab/state.json), save facts, console and
save resources, requests, request records, refusals, events and event
pages. A stdlib parser validates each kind with field-level errors, keeps
unknown fields of open documents, and round-trips every golden. Legacy
Lab/state twins pin the mapping Slice 1's app writer must honour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine added a commit that referenced this pull request Nov 14, 2026
Moves the seven open questions to settled with their recommended answers,
writes the nine answers from the 2026-11-14 implementation review into the
resources, lease, tool and slice text, corrects the legacy Lab/state fields
and what 7c44e72 does, and records Slices 0-3 as built (#478, #481, #482,
#483) and Slice 4 as approved on PokemonAutomation#1881's branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
@dayfine
dayfine marked this pull request as ready for review November 14, 2026 23:43
@dayfine
dayfine merged commit 03dafba into agents Nov 14, 2026
1 check 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