Skip to content

Lab: define versioned state JSON contract - #476

Closed
dayfine wants to merge 2 commits into
design/agent-integrationfrom
lab/agent-integration-state-v1
Closed

dayfine wants to merge 2 commits into
design/agent-integrationfrom
lab/agent-integration-state-v1

Conversation

@dayfine

@dayfine dayfine commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Base: design/agent-integration (fork PR #131). This stacked diff shows only the first implementation slice.

Problem

The MCP design needs a stable app-authored state contract before live UI and video data are wired. The existing Lab/state format cannot represent app identity, frame freshness, action provenance, or explicit unknown observations.

Change

  • Add a typed LabStateV1 model and schema-1 JSON serializer.
  • Keep unavailable frame, transition, game, and screen facts explicitly null or unknown.
  • Separate transport freshness from visual signal classification.
  • Add native data-driven serialization tests for observed and default states.
  • Group the existing infrastructure test registrations so adding this test does not exceed the code-health function-size guidance.

How to review

  1. Read LabStateV1.h for the contract.
  2. Read LabStateV1.cpp for the JSON mapping.
  3. Read LabStateV1_Tests.cpp for the two golden cases.
  4. ComputerPrograms_UnitTestRunner.cpp only moves existing infrastructure registrations unchanged into a helper, then adds the new test.

Moved-line view:

git diff --color-moved=dimmed-zebra --color-moved-ws=allow-indentation-change design/agent-integration...lab/agent-integration-state-v1

Tests

  • Targeted C++ Code Health against origin/design/agent-integration: 0 failures and no advisories.
  • Fork Draft CI: pending.

@dayfine

dayfine commented Nov 14, 2026

Copy link
Copy Markdown
Owner Author

Closing: the #131 design (merged c97618b) keeps one app ProgramState enum; #481 writes Lab/state.json, so this second enum/contract is superseded.

@dayfine dayfine closed this Nov 14, 2026
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