Skip to content

fix(sdd): validate companion case and acceptance consistency - #654

Merged
efraespada merged 7 commits into
developfrom
bugfix/653-bug-generated-companion-sdd-publishes-colliding-case-ids-and-inconsistent-acceptance-mappings
Oct 21, 2026
Merged

efraespada merged 7 commits into
developfrom
bugfix/653-bug-generated-companion-sdd-publishes-colliding-case-ids-and-inconsistent-acceptance-mappings

Conversation

@efraespada

@efraespada efraespada commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Generated companion SDDs could publish with case IDs reused for different behavior, offsetting per-area budget errors, one-sided acceptance mappings and nonexistent documentation paths. This change validates explicit draft inventories against every owning SDD and the immutable base before publication, with one bounded repair and a specific localized non-ready result on repeated failure.

Closes #653.

What changed

  • Reserve baseline case identities across the owner's primary and companion SDDs, including legacy shorthand inventories.
  • Require the selected SDD itself in the path inventory with the correct create/update operation; cover the review finding and all reported partial branches.
  • Keep consistency tables and owner IDs inside code fences excluded until a valid matching close. Preserve literal comment syntax inside code and ignore fence markers inside HTML comments; cover invalid closing text, indentation and comment precedence.
  • Reconcile every budget area and both directions of requirement/case mappings. Check existing file citations against Git objects and require explicit declarations for intended new files. Relative Markdown links resolve their pathname without URL queries or fragments, preserving encoded-path validation.
  • Preserve owner bytes and verified publication recovery; update the owning SDD, catalog, user guidance and generated bundles.
  • Allow 30 minutes for the hosted Windows platform job (20 for Linux/macOS), preserving its full tests and coverage gates after the expanded native verification setup exhausted the old limit.

Validation

  • Full coverage suite: 704 suites, 11,630 passed, 35 skipped; repository and specialized coverage gates pass.
  • New consistency policy: 100% lines/branches/statements/functions. Includes 120 new cases across policy, application, real Git workspace and localized recovery.
  • Type checking, lint, specification generation/validation, documentation, agent documentation and workflow checks pass.
  • Build, package validation and packaged CLI/API/local-web smoke checks pass. Graphify updated.

Review notes

New generated candidates require visible requirement, case, path and traceability tables. Retained owner documents keep their bytes and existing formats. These checks establish structural consistency for draft publication; human review, live provider quality and consumer runtime acceptance remain separate.

…nd-inconsistent-acceptance-mappings: validate companion case and acceptance consistency
…nd-inconsistent-acceptance-mappings: preserve appendix recovery size boundaries
@vypbot vypbot added size: XXL Indicates an extremely large task or issue that requires significant time and effort to complete. 90% Progress: 90% state:ai-processing labels Oct 21, 2026
@vypbot
vypbot self-requested a review October 21, 2026 16:32
@vypbot vypbot added this to vypdev Oct 21, 2026
@vypbot vypbot moved this to In Progress in vypdev Oct 21, 2026
@vypbot
vypbot changed the base branch from develop to master October 21, 2026 16:32
@vypbot
vypbot changed the base branch from master to develop October 21, 2026 16:32

@vypbot vypbot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current status: All findings originating in this review are resolved.
Last reconciled on b4e0cd3. See aggregate Bugbot status.

🤖 Bugbot review snapshot

Bugbot reported 1 potential problem when commit 3b933a5 was analyzed. This snapshot is historical; use the status block above for current state. 1 finding is linked to changed code.

Findings

  • low: Require the proposed SDD path in the path inventory — src/domain/sdd_draft_consistency.ts:158

Comment thread src/domain/sdd_draft_consistency.ts Outdated
@vypbot

vypbot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Bugbot: review complete

Current status: No active findings on b4e0cd3.

Pull request · Verified commit · Workflow run

@vypbot

vypbot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Copilot approval · Human review needed

Status: A protected workflow, policy, or trust-boundary file changed.
Completed: 1/1 observed checks succeeded; Bugbot complete.
Action required: Ask a human reviewer to decide.
Impact: No new approval is confirmed for this revision.
See checks

Technical evidence

Revision: b4e0cd3acf49; base: 2c17043abe74; reason: protected-path.

@codecov-commenter

codecov-commenter commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.12%. Comparing base (274db40) to head (b4e0cd3).
⚠️ Report is 1600 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #654      +/-   ##
===========================================
+ Coverage    90.94%   94.12%   +3.18%     
===========================================
  Files          135      968     +833     
  Lines         6251    31370   +25119     
  Branches      1338     9203    +7865     
===========================================
+ Hits          5685    29528   +23843     
- Misses         172      715     +543     
- Partials       394     1127     +733     
Files with missing lines Coverage Δ
...tion/policies/application_error_message_catalog.ts 100.00% <ø> (ø)
...tion/usecases/sdd/pre_branch_sdd_draft_workflow.ts 100.00% <100.00%> (ø)
...ation/usecases/sdd/pre_branch_sdd_gate_use_case.ts 89.79% <100.00%> (ø)
src/data/model/application_error.ts 100.00% <ø> (ø)
src/domain/pre_branch_sdd.ts 86.77% <100.00%> (ø)
src/domain/sdd_draft_consistency.ts 100.00% <100.00%> (ø)
...infrastructure/pre_branch_sdd_workspace_adapter.ts 77.47% <100.00%> (ø)
src/testing/sdd_consistency_fixture.ts 100.00% <100.00%> (ø)

... and 1027 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@docs-page

docs-page Bot commented Oct 21, 2026

Copy link
Copy Markdown

To preview the documentation for this pull request, visit the following URL:

docs.page/vypdev/copilot~654

Documentation is deployed and generated using docs.page

@efraespada

Copy link
Copy Markdown
Member Author

/copilot sync-branch

…olliding-case-ids-and-inconsistent-acceptance-mappings
@vypbot

vypbot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Branch synchronized

develop was merged into bugfix/653-bug-generated-companion-sdd-publishes-colliding-case-ids-and-inconsistent-acceptance-mappings and pushed as d55309e8d2e9ab5a9e65d2433c8773813637ec38.

6 verification checks passed.

…nd-inconsistent-acceptance-mappings: require selected specification path declarations
@efraespada

Copy link
Copy Markdown
Member Author

/copilot recheck

@vypbot vypbot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current status: All findings originating in this review are resolved.
Last reconciled on b4e0cd3. See aggregate Bugbot status.

🤖 Bugbot review snapshot

Bugbot reported 1 potential problem when commit a8f8dbb was analyzed. This snapshot is historical; use the status block above for current state. 1 finding is linked to changed code.

Findings

  • low: Relative links with query strings are rejected — src/domain/sdd_draft_consistency.ts:190

Comment thread src/domain/sdd_draft_consistency.ts Outdated
…nd-inconsistent-acceptance-mappings: resolve relative SDD link pathnames before checking evidence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

90% Progress: 90% size: XXL Indicates an extremely large task or issue that requires significant time and effort to complete. state:verified

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

🐛🧑‍💻 - bug generated companion SDD publishes colliding case IDs and inconsistent acceptance mappings

3 participants