Skip to content

[Feature]: Separate contract authority from source review fan-out in the structure manifest #5116

Closed

Description

@lidge-jun

Area

Documentation

What are you trying to accomplish?

Let maintainers find one authoritative statement for each cross-cutting contract while still reviewing all documents affected by a source-area change.

What prevents this today?

scripts/structure-ssot.ts:31 represents related source paths but no contract owner/dependent distinction. structure/AGENTS.md:45 makes every mapped document an update obligation; structure/INDEX.md:126 maps the broad server area to many documents. Repeated cross-cutting preambles already appear in runtime/config/transport documents.

What should OpenCodex do?

Keep many-to-many source review coverage, add stable contract authority links and distinguish review obligations from actual content changes. Consumer docs link to the owner instead of repeating the same normative prose.

Example usage or interface

A change under src/server/ still lists every relevant document for review. A named streaming contract points to one owner anchor; only changed dependent explanations need edits. No automatic claim of semantic proof is made from link validation.

Alternatives or workarounds

A prose-only cleanup is smaller but leaves authority navigation manual. One owner per source directory is explicitly wrong for this repository and is not proposed.

Additional context

Source snapshot: 7864869c31c41cca9830d93540238f17df8faafb after fast-forwarding dev on 2026-09-19. This is source-grounded analysis, not a runtime test result.

This preserves the existing checker and mutation-tested structural guards. It does not replace structural invariants with runtime-only tests.

Implementation path

  1. Add a versioned optional contracts section in structure/manifest.json: stable ID, owner document+anchor, dependent documents.
  2. Update scripts/structure-ssot.ts parsing, validation and index generation; reject duplicate IDs, missing files/anchors and invalid dependents.
  3. Regenerate structure/INDEX.md; never hand-edit generated output.
  4. Amend structure/AGENTS.md to require review of all mapped documents and updates to the owner plus affected dependents.
  5. Migrate a few existing duplicated contracts with preserved links before expanding coverage. Extend tests/ci-workflows/structure-ssot.test.ts with malformed-manifest and generated-output cases.

Acceptance criteria and verification

  • Existing many-to-many source ownership remains accepted.
  • Duplicate/missing authority entries fail the checker; valid consumer links appear in generated navigation.
  • Unrelated source changes do not require copied unchanged-behavior prose.
  • The checker continues to claim topology and declared binding only, not behavioral correctness.

Register new tests in both layout inventories, preserve size caps, and update the existing structure owners. User-facing policy changes need corresponding public documentation and non-contradictory translations. Run focused tests and exact-head hosted CI during implementation; no local suite was run for this analysis.

Checks

  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.

Activity

  1. added
    enhancement
    on Sep 19, 2026
  2. added a commit that references this issue on Sep 19, 2026
    6d42723
  3. lidge-jun commented on Sep 19, 2026

    @lidge-jun
    OwnerAuthor

    Resolved by #5155, merged into dev as 6d4272338701a15b0ed2adc3f422f5a7c33fef11.

    Acceptance verified at reviewed head 36be9dbeeeaf8bac044a57639b33f55d9d2ea3c5: optional versioned contract registry, validated authority/dependent links, generated navigation, preserved many-to-many source review fan-out, consolidated normative text and clarified review/update obligations. Validation claims declared topology only, not behavioral or semantic completeness.

    Independent reviews passed. Hosted run35438419328 passed all applicable jobs and aggregate CI, including actual CLI --fix regressions for malformed input and valid regeneration. All review findings were resolved or explicitly dispositioned as pre-existing optional hardening. Actual merge and dev ancestry were reread. No local suites/tests/typecheck/build were run by the coordinator.

    The separately tracked runtime sideband CI failure is not claimed resolved by this repository-tooling change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions