F5: cross-rung format contract + round-trip (#14) #15
Reference in New Issue
Block a user
Delete Branch "feature/14-cross-rung-format"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements Feature #14 (F5) per the graduated spec
vscode-cowriting-plugin-content/specs/coauthoring-cross-rung-format.md— the.threads/sidecar graduates from the editor's private shape into the published cross-rung contract.specs/coauthoring-sidecar-contract.mdv1.0, content repo, INV-14) + JSON Schema (schemas/coauthoring-sidecar.schema.json) + rung-neutral validator (scripts/validate-sidecar.mjs, ajv dev-only); schema wired into the unit suite (drift fails CI).Provenance.email+agent.onBehalfOf(git's identity model, fork c); serializer unknown-field preservation at every level (INV-15);isNewerMajor+ store write-refusal backstop;VersionGuard— newer-major sidecars render best-effort, warn once, write nothing (INV-16, PUC-4);currentAuthor()populates email from workspace git config, fail-open.mergeArtifacts: pure 2-way union-by-id, deterministic symmetric tie-breaks, every resolved divergence surfaced inconflicts(INV-17); throws on differing majors.scripts/crossrung-reply.mjsGitea-rung stand-in (independent contract implementation; byte-fidelity unit test is the drift tripwire) + host E2E: editor thread → stand-in reply → external change → reply renders at the re-resolved anchor (PUC-2); newer-major warning + untouched bytes (PUC-4).All additive —
schemaVersionstays 1; existing sidecars unchanged.Test plan
npm run typecheckcleannpx vitest run— 98 passed (schema validation, identity, INV-15 preservation, INV-16 refusal, merge cases, stand-in byte-fidelity)npm run test:e2e— 18 + 3 passing (incl. F5 round-trip + fail-safe)Closes #14
🤖 Generated with Claude Code