Skip to content

feat: add portable Go backend contracts and test doubles - #2065

Open
Brad-Edwards wants to merge 4 commits into
go-cutoverfrom
1790-port-backend-contracts
Open

Brad-Edwards wants to merge 4 commits into
go-cutoverfrom
1790-port-backend-contracts

Conversation

@Brad-Edwards

@Brad-Edwards Brad-Edwards commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds public Go backend roles, manifest/profile access, owned request and result records, and runtime-free backend doubles. Envelope subsumption, witnesses and probes reuse the existing admission and SDL owners. Python and published schemas are unchanged.

Requirement UIDs

Related Issues

Closes #1790

ADR Impact

  • Preserves ADR-060, ADR-070, ADR-115, ADR-121 and ADR-122.
  • Implements the accepted additive API decision without changing existing signatures.

Changes

  • Include backend packages in the existing shared CI group so race and coverage tests cover the complete module.
  • Preserve accepted interface names as exact aliases of ParticipantStageResolver and NativeActionInvoker; include their design and typed API commitments.
  • Add portable provisioning, participant, time, supervision, mixed-service, inventory and recovery interfaces.
  • Add bounded materialization/preparation records and sealed participant action requests with owned copies and identity/evidence checks.
  • Add inert provisioning, orchestration, evaluation and participant doubles with explicit clocks and envelope configuration.
  • Extend the shared envelope relation for subsumption, witnesses and validated positive/negative probes; correct reference digest handling for Unicode and interval bounds.
  • Add independent Python reference fixtures, security/refusal tests, source-case routing and exact architecture/API commitments.
  • Document native map-order/resource-index limits and retain live registration, dispatch and runtime-dependent adapters with Go port 35: Move the completed Go runtime and its tests into the runtime repository #1894.

Test Plan

  • Targeted Go tests passed for backend roles/profiles, all doubles, runtime contracts, envelope relations, SDL witnesses/probes and the changed observation selector.
  • Scoped portable/full-admission golden cases passed for backend manifests, profiles, envelopes and operations.
  • Strict lint passed: golangci-lint run --config ../.golangci.yml ./backend/... ./contract/runtime ./contract/admission ./internal/sdl/authoring ./sdl ./processor/realization.
  • Code/design archcheck, file-local repo-policy, exact-path Vale checks and git diff --check passed.
  • Added focused tests for atomic reset, generation fences, native outcomes, retained observations, state ownership, temporal joins, envelope membership and refusal budgets. All 17 new targeted cases passed locally; combined with the prior CI artifact they cover 54,402 of 60,438 statements (90.01%). Final CI passed the 90.0% product statement-coverage gate.
  • CI package partition verified: all 41 product packages occur exactly once; targeted TestHostedGates passed.
  • Commit hygiene and secrets check passed. Full test, coverage and fuzz lanes passed in CI. Exhaustive mutation diagnostics remain opt-in CI work.
  • Final CI: 62 checks passed; deployment skipped as expected. All five Sonar findings were fixed; the quality gate passed.

Ground Control Checks

The automated pre-push review timed out three times without a verdict. A validated longer timeout did not extend the service deadline and was reverted. On 2026-11-18 the maintainer explicitly instructed: “publish without we're not doing a fourth. work manually around gc”.

Publication uses the manual Git/GitHub path under that authorization. No completed automated review is claimed; CI and normal merge review remain required.

Traceability

  • IMPLEMENTS: implementations/go/backend/, implementations/go/contract/runtime/, the existing admission/SDL owners and implementations/architecture.json.
  • TESTS: focused Go tests and independent fixtures in those packages; implementations/go/backend/testdata/source-case-map.json.

Checklist

  • Public API, architecture and security boundaries documented.
  • Python and published schemas unchanged.
  • Conventional Commit title; release-please owns changelog/version changes.
  • Targeted local verification only.
  • CI checks complete.

Documentation

Updated: backend design, accepted API additions, verification/source-case records and generated architecture view.

This branch has not been deployed

No deployments
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