feat(harness): redesign r2 event interactions#71
Merged
Conversation
Add rule/narrative/refs payload helpers, pin event envelopes to schema v2, and move accepted/synced resource material into payload.rule so deterministic exchange remains structured. Validation: go test ./harness/internal/event ./harness/internal/contract ./harness/internal/mnemond/state; go test ./harness/internal/mnemonhub/exchange/...; go test ./harness/internal/app; go test ./harness/cmd/mnemon-harness
Move standard and external event package payloads to explicit rule, narrative, and refs sections. External capability specs now require schema_version 2 with sectioned fields, sync import material rides payload.rule, and presentation/runtime readers understand nested items. Update acceptance prompts and test fixtures to emit R2-shaped events; validate with go test ./harness/...
Return derived event envelopes on presentation responses for structured consumers while preserving body-only hook rendering. Derived presentation event text now lives under payload.narrative so rule and LLM payloads stay separated. Validation: go test ./harness/...
Add control teamwork/profile commands that build rule/narrative/refs payloads and submit through the existing channel observe path. Update the embedded guide and payload contract so agents prefer the short producer surface while low-level observe remains the nested JSON API. Validation: go test ./harness/...
Update harness shell acceptance to emit rule/narrative/refs payloads and v2 external event package specs. The sync-pair flow still covers mnemonhub HTTP exchange with standard and external importable kinds. Validation: bash -n harness/scripts/e2e.sh; go test ./harness/...; bash harness/scripts/e2e.sh; MNEMON_GITHUB_LIVE=1 go test ./harness/internal/app -run TestGitHubLivePublishPullImport -count=1 -v against mnemon-dev/mnemon-teamwork-example.
Record accepted envelope payload-shape evidence in acceptance observe reports and assert that real collaboration acceptance surfaces use schema v2 rule/narrative/refs payloads. This keeps the R2 proof in existing hostagent/mnemond/mnemonhub and GitHub mesh reports without adding a new runtime concept. Validation: go test ./harness/cmd/mnemon-harness; go test ./harness/...
Detect GitHub rate-limit hints already surfaced by the publication backend and pause the serving sync worker until retry_after or rate_limit_reset. This prevents GitHub mesh acceptance and runtime sync from repeatedly hammering the API after quota is exhausted. Validation: go test ./harness/internal/app -run 'TestSyncWorker|TestSyncGitHubFake' -count=1 -v; go test ./harness/...
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
Validation