Skip to content

OpenMind v2 Phase 6: formal Requirement Traceability, coverage gaps and governed Conflict resolution#12

Merged
HelloThisWorld merged 5 commits into
mainfrom
feat/v2-phase6-traceability-conflicts
Jul 22, 2026
Merged

OpenMind v2 Phase 6: formal Requirement Traceability, coverage gaps and governed Conflict resolution#12
HelloThisWorld merged 5 commits into
mainfrom
feat/v2-phase6-traceability-conflicts

Conversation

@HelloThisWorld

Copy link
Copy Markdown
Owner

Builds formal, evidence-backed engineering traceability and governed conflict management over the Phase 5 canonical graph. Runtime 1.6.0-dev, migration head v0007, Bundle 2.0.0-draft.2, .openmind stays 1.1.0. Full design: docs/v2/phase-6-traceability-conflicts.md.

What changed

A graph path is not a trace. graph path stays generic reachability; a formal trace must satisfy the workspace's selected Traceability Policy — every node maps to a policy stage, every edge type is allowed for that transition, lifecycle and evidence verify, traversal is bounded. possibly-related never satisfies implements, calls alone never proves a Requirement, and a missing link is returned as a Gap, never invented.

  • openmind/traceability/ (13 modules): closed policy model + validator, five built-in policies (generic-engineering, api-service, event-driven-service, batch-processing, japanese-v-model), organization policy directory (checksummed, invalid files listable, executable content rejected), deterministic trace engine (requirement + reverse code/test), coverage with honest null percentages, 19 gap types with policy-driven severities, orphan queries (untraced, never "invalid"), incremental refresh, comparable-fact normalization, six deterministic conflict detectors, conflict lifecycle + explicit candidate promotion, TraceabilityService.
  • Migration v0007 — 11 additive tables + indexes; v0001–v0006 untouched (checksums verified); a seeded v0006 database migrates with zero loss.
  • Incrementality — everything derived is stamped Knowledge Revision × policy checksum × engine version. Unchanged refresh = no-op; an alias change rebuilds nothing; a changed code entity rebuilds only its upstream Requirements; policy change rebuilds all. Historical snapshots are never overwritten.
  • Knowledge Revision rule (documented) — trace refresh mints NO revision; conflict create/promote/govern, gap governance and policy selection each mint exactly one, with the Human Decision recorded in the same transaction (conflict decisions are doubly audited: own ledger + Phase 5 ledger).
  • Deterministic conflicts — typed comparable facts only (durations with explicit units, counts, HTTP method + path, key=value config, field types, authority-marked values). Units are never guessed; arbitrary prose is never compared; a missing test is a Gap, not a Conflict. Two-level identity: exact dedup key observes; subject-level supersedes when values change (history preserved); dismissals suppress via fingerprint until the facts change.
  • Adapterstrace/conflict CLI groups (actor+note on every write), additive REST under /projects/..., exactly 8 read-only MCP tools (35 → 43). No write-capable MCP tool.
  • Bundle 2.0 Draft.2 — opt-in --include-traceability / --include-conflicts files with referential backfill; standalone verifier extended (trace roots/relations, step ordering, conflict joins, coverage arithmetic, current-only staleness).
  • Jobstraceability_refresh + conflict_scan on the existing single worker; ingestion gains only a lightweight local trace-staleness mark; a partial scan is reported failed, never complete.

Verification

python scripts/run_acceptance.py --all: 79 passed, 0 failed, 0 skipped — 64 pre-existing suites plus 15 new Phase 6 suites (376 checks), all registered in the manifest. CI gains 15 full-gate steps, the 43-tool MCP smoke, and a cross-platform Phase 6 smoke (policy → trace → gap → conflict → promotion → coverage → bundle verify). Zero provider calls in refresh/scan is proven with network entry points patched to fail.

Notes for review

  • Phase 5 vocabularies were extended additively (new DecisionType/RevisionAction/PromotionCandidateKind members); no existing member renamed.
  • Five Phase 1–5 assertions were updated for the new head (v0007, 43 tools, draft.2) — each an intentional extension of a per-phase compatibility gate, mirroring what Phase 5 did to the Phase 4 gates.
  • latest_completed_run orders by analyzed revision, not timestamp: one-second timestamp resolution made same-second runs tie and could pick the wrong incremental baseline.
  • Deferred to Phase 7+: Git diff sync, branch/PR overlays, webhooks, CI blocking, automatic resolution/promotion, connectors, plugin/skill packaging, Neo4j/Cypher/GraphQL, Bundle freeze.

- openmind/traceability/: closed vocabularies, policy model + validator,
  5 built-in policies, org policy loading, v0007 store, deterministic
  trace engine, gap detection + orphans, coverage, incremental refresh
  snapshots, comparable facts, 6 deterministic conflict detectors,
  conflict scan/lifecycle/promotion, TraceabilityService
- migration v0007_traceability_conflicts (additive, 11 tables)
- Phase 5 vocabularies extended additively (decision/revision/promotion
  members for conflict + gap + policy governance)
- runtime.traceability + ServiceContainer.traceability wired
- jobs: traceability_refresh + conflict_scan types; trace staleness mark
  after graph reconciliation; delete/terminate wipe Phase 6 rows
- 8 read-only MCP tools (35 -> 43); compatibility gates updated
- runtime version 1.6.0-dev; migration-head assertions updated
…undle

- cli_trace.py: trace policy/refresh/requirement/code/test/path/coverage/
  gaps/orphans + conflict scan/list/show/promotion/governance groups
- REST: additive /projects/{id}/traceability/* and /conflicts* routes,
  typed request models, no generic mutation endpoint
- bundle 2.0.0-draft.2: opt-in --include-traceability/--include-conflicts
  files with referential backfill; verifier checks trace roots/targets/
  relations/step ordering/gap roots/conflict joins/coverage arithmetic/
  current-only staleness
- 15 acceptance suites (376 checks) + _traceability_helpers fixture kit,
  all registered in run_acceptance.py
- fixes surfaced by the suites: latest_completed_run ordered by analyzed
  revision (second-resolution timestamp ties picked the wrong baseline),
  gap acceptance expiry overwritten instead of merged, subject-level
  conflict supersession (changed values produce new claim ids so the
  exact dedup key can never match) with draft grouping so simultaneous
  value pairs never ping-pong, scan-driven conflict decisions linked to
  the Knowledge Decision ledger
- CI: 15 full-gate steps, 43-tool MCP smoke, v0007 smoke, Phase 6
  cross-platform smoke (policy -> trace -> gap -> conflict -> promotion
  -> coverage -> bundle)
- docs: README Phase 6 section + 43-tool table, cli.md trace/conflict
  groups + draft.2 bundle flags, database-migrations.md v0007
- verify_migrations: repeat-run already-applied list includes v0007
- verify_asset_adapters: 43-tool accounted-for gate includes TRACE set
- verify_knowledge_bundle / verify_knowledge_cli: draft.1 -> draft.2
- docs/v2/phase-6-progress.md status ledger
created_at has one-second resolution: on a fast runner two coverage
snapshots can be born in the same second and list ordering falls back to
random ids, so asserting on list position picked the new snapshot. Assert
the actual property instead: every non-current snapshot remains queryable
with its metrics.
@HelloThisWorld
HelloThisWorld merged commit 01dacca into main Jul 22, 2026
6 checks passed
@HelloThisWorld
HelloThisWorld deleted the feat/v2-phase6-traceability-conflicts branch July 22, 2026 19:32
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