Downstream consumer boundary tracking (12.1.1) - #151
Conversation
Draft ExecPlan for roadmap task 12.1.1, "Track the downstream consumer boundary". The plan delivers a TOML manifest, a generated Markdown matrix, an ADR 007 vocabulary section, and a referential-integrity gate in a new weaver-docs-gate workspace member so every command- contract task records whether it consumes OrthoConfig, wraps it temporarily, depends on a not-yet-decided upstream contract, or deliberately diverges via ADR 007. Revised after a Logisphere pre-implementation review. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughIntroduces the ChangesOrthoConfig Consumer Boundary Matrix Gate
Sequence DiagramsequenceDiagram
rect rgba(100, 149, 237, 0.5)
note over CLI,render_matrix: render_boundary_matrix CLI example flow
participant CLI as render_boundary_matrix
participant load_manifest_file
participant cap_std_Dir as cap_std::Dir
participant load_manifest
participant toml_parse as TOML parser
participant render_matrix
CLI->>load_manifest_file: path: &Utf8Path
load_manifest_file->>cap_std_Dir: open_ambient_dir(parent)
cap_std_Dir-->>load_manifest_file: Dir
load_manifest_file->>cap_std_Dir: read_to_string(file_name)
cap_std_Dir-->>load_manifest_file: file contents
load_manifest_file->>load_manifest: impl Read
load_manifest->>toml_parse: parse manifest from bytes
toml_parse-->>load_manifest: BoundaryManifest
load_manifest-->>load_manifest_file: Ok(BoundaryManifest)
load_manifest_file-->>CLI: Ok(BoundaryManifest)
CLI->>render_matrix: &BoundaryManifest
render_matrix-->>CLI: Markdown String
CLI->>cap_std_Dir: write rendered output
end
Possibly Related Issues
Poem
🚥 Pre-merge checks | ✅ 19 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (19 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Add the ADR 007 boundary classification section with the fixed state vocabulary and matrix column contract for downstream command-contract tasks. Mark the 12.1.1 ExecPlan as active and record Stage A validation, CodeRabbit review, and the temporary OrthoConfig SHA pin decision.
Add a private docs-gate crate that parses the consumer-boundary manifest and renders the committed Markdown matrix from it. Pin `ortho_config` to the requested upstream SHA until the project settles an OrthoConfig v0.9.0 release, and record the Stage B gate and CodeRabbit evidence in the ExecPlan.
Cross-link the generated consumer boundary matrix from the documentation index, developer workflow, and each manifest-managed roadmap task group. Record the Stage C validation and CodeRabbit result in the ExecPlan so the next implementation slice can continue from the reviewed state.
Add integration tests that validate the boundary manifest against the roadmap, ADR 007 anchors, state-specific evidence fields, and the committed Markdown matrix. Keep the renderer aligned with the formatter-stable matrix output and record Stage D validation plus CodeRabbit follow-up in the ExecPlan.
Document the temporary wrapper and pending-contract states users may encounter before the 0.1.0 command-surface compatibility promise. Record the final Stage E gates and clean CodeRabbit review in the ExecPlan.
|
@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix. Include the file and symbol names indicated in the issue at the head of your response. crates/weaver-docs-gate/tests/boundary_manifest.rs Comment on file //! Integration tests for the `OrthoConfig` consumer boundary manifest.
❌ New issue: String Heavy Function Arguments |
|
@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix. Include the file and symbol names indicated in the issue at the head of your response. crates/weaver-docs-gate/tests/boundary_manifest.rs Comment on lines +211 to +228 fn validate_consumes_evidence(task: &BoundaryTask) -> TestResult {
ensure(
task.shipped_in.is_some(),
format!("consumes task {} must name shipped_in", task.id),
)?;
ensure(
task.removal_gate.is_none(),
format!("consumes task {} must not carry removal_gate", task.id),
)?;
ensure(
task.adr_anchor.is_none(),
format!("consumes task {} must not carry adr_anchor", task.id),
)?;
ensure(
task.next_review_by.is_none(),
format!("consumes task {} must not carry next_review_by", task.id),
)
}❌ New issue: Code Duplication |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Replace path-string helper parameters with Utf8Path inputs and field-name labels with a small enum so the docs-gate tests model those arguments with more precise types.
Share the repeated optional-field validation used by the boundary manifest state evidence tests, and let the basic assertion helper accept string-like messages directly.
|
@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix. Include the file and symbol names indicated in the issue at the head of your response. crates/weaver-docs-gate/tests/boundary_manifest.rs Comment on lines +254 to +265 fn validate_consumes_evidence(task: &BoundaryTask) -> TestResult {
validate_field_constraints(
task,
"consumes",
("shipped_in", task.shipped_in.is_some()),
&[
("removal_gate", task.removal_gate.is_some()),
("adr_anchor", task.adr_anchor.is_some()),
("next_review_by", task.next_review_by.is_some()),
],
)
}❌ New issue: Code Duplication |
This comment was marked as resolved.
This comment was marked as resolved.
Replace the duplicated state-specific wrapper functions in the docs-gate boundary manifest tests with a single dispatcher that preserves the existing field constraint rules for each state.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c73e831826
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Mark roadmap task 12.1.1 complete and update the ExecPlan with the final implementation status, follow-up test refactors, validation evidence, and retrospective findings.
Parse pending next_review_by dates in the docs-gate boundary manifest test and fail rows whose review date is more than 270 days behind the build date, using SOURCE_DATE_EPOCH when present for reproducible builds. Record the post-completion gate fix in the ExecPlan.
This comment was marked as resolved.
This comment was marked as resolved.
|
@coderabbitai resume |
✅ Action performedReviews resumed. |
Replace the separate parser and file-adapter error assertion helpers with one generic helper that preserves debug diagnostics on mismatch. Keep the load-manifest test cases and fixture data unchanged.
Add component-level docs for the renderer tests and matrix regeneration example. Make the boundary manifest gate emit structured failure messages, trace validation decisions, and increment a validation-failure metric while keeping the observability crates as docs-gate dev-dependencies. Run the boundary manifest gate as a named CI step and document the remediation path in the developer guide, roadmap, and ExecPlan.
|
@coderabbitai resume |
✅ Action performedReviews resumed. |
Emit `tracing` events and load-outcome metrics from the docs-gate manifest reader and file adapter so callers can diagnose read, path, and schema failures outside the integration tests. Include remediation guidance in generated parser/file errors, remove the renderer test helper clone path flagged by review, and update the roadmap, developer guide, and ExecPlan with the operational boundary.
|
@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix. Include the file and symbol names indicated in the issue at the head of your response. Ensure that this is validated against the current version of the codegraph. If further refinement to address this finding would be deleterious, please supply a clear explanatory one to two paragraph markdown message I can paste into the CodeScene web ui's diagnostic suppression function so this diagnostic can be silenced. Code Duplicationcrates/weaver-docs-gate/src/lib.rs: What lead to degradation?The module contains 2 functions with similar structure: record_file_load_success,record_load_success Why does this problem occur?Duplicated code often leads to code that's harder to change since the same logical change has to be done in multiple functions. More duplication gives lower code health. How to fix it?A certain degree of duplicated code might be acceptable. The problems start when it is the same behavior that is duplicated across the functions in the module, ie. a violation of the Don't Repeat Yourself (DRY) principle. DRY violations lead to code that is changed together in predictable patterns, which is both expensive and risky. DRY violations can be identified using CodeScene's X-Ray analysis to detect clusters of change coupled functions with high code similarity. Read More |
|
@coderabbitai resume |
This comment was marked as resolved.
This comment was marked as resolved.
✅ Action performedReviews resumed. |
Document the `load_manifest` and `load_manifest_file` tracing and metrics side effects in public Rustdoc so downstream callers see the operational contract at the API boundary. Add example CLI error-path coverage, property checks for ISO date and state/evidence invariants, and a `trybuild` pass test that compiles a small downstream public API fixture.
|
@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix. Include the file and symbol names indicated in the issue at the head of your response. crates/weaver-docs-gate/tests/support/boundary_properties.rs Comment on lines +140 to +167 const fn expected_state_evidence(state: BoundaryState, flags: EvidenceFlags) -> bool {
match state {
BoundaryState::Consumes => {
flags.has(SHIPPED_IN)
&& !flags.has(REMOVAL_GATE)
&& !flags.has(ADR_ANCHOR)
&& !flags.has(NEXT_REVIEW_BY)
}
BoundaryState::Wraps => {
flags.has(REMOVAL_GATE)
&& !flags.has(SHIPPED_IN)
&& !flags.has(ADR_ANCHOR)
&& !flags.has(NEXT_REVIEW_BY)
}
BoundaryState::Pending => {
flags.has(NEXT_REVIEW_BY)
&& !flags.has(SHIPPED_IN)
&& !flags.has(REMOVAL_GATE)
&& !flags.has(ADR_ANCHOR)
}
BoundaryState::Divergent => {
flags.has(ADR_ANCHOR)
&& !flags.has(SHIPPED_IN)
&& !flags.has(REMOVAL_GATE)
&& !flags.has(NEXT_REVIEW_BY)
}
}
}❌ New issue: Complex Method |
This comment was marked as resolved.
This comment was marked as resolved.
Replace the separate reader and file success helpers with one `record_success` helper that keeps the source label and optional path field explicit while sharing the success metric and trace event shape.
Replace the state-specific compound boolean checks with a direct required-bit comparison so the property oracle matches the four-bit evidence model without exceeding the complexity threshold.
Remove the mechanical manifest DTO adapter and deserialize the boundary manifest directly into the public domain types. Keep the TOML spelling contract explicit with serde renames and empty-string handling for optional evidence fields. Expand the property tests around the manifest gate so generated inputs cover registry symmetry, arbitrary state/evidence rows, ADR anchor membership, and Markdown heading-anchor shape.
|
@coderabbitai please provide an updated PR description:
|
Summary
Implements roadmap task 12.1.1, "Track the downstream consumer boundary,"
in full. All stages A–E of the ExecPlan are complete.
Deliverables:
consumes,wraps,pending,divergent) defined in a new "Boundary classification" section ofdocs/adr-007-agent-native-command-surface.md, with per-state evidencerequirements and staleness rules.
docs/orthoconfig-consumer-boundary.toml) as thesingle machine-readable source of truth, covering roadmap tasks 12.1.1
through 20.3.3 with an explicit
managed_tasksregistry (fail-closed,no topic-keyword heuristics).
docs/orthoconfig-consumer-boundary.md)committed byte-for-byte, regenerated via the
render_boundary_matrixexample in
weaver-docs-gate.crates/weaver-docs-gate— new workspace member hosting:BoundaryState,UpstreamRole,UpstreamRef,BoundaryTask,BoundaryManifest) and error types (BoundaryError,BoundaryFileError) with remediation text.load_manifest/load_manifest_filepublic API withtracingevents and a bounded
weaver_docs_gate_boundary_manifest_load_totalcounter (labels:
source,outcome).manifest_adapter) with DTO-to-domainFromconversions and anempty_string_as_noneserde helper.render_matrix) with deterministic phase groupingand column-width calculation.
tests/boundary_manifest.rs: referential-integrity checks across the manifest, roadmap, and ADR 007 anchors,
including byte-for-byte matrix equality, ISO date validation, and a
270-day
pending.next_review_bystaleness gate.proptest) for column-width, cell-escaping,date-window, phase-grouping, and state-evidence invariants.
trybuild..github/workflows/ci.yml.docs/roadmap.md(12.1.1 checked, back-linksfor phases 12–20),
docs/developers-guide.md(boundary workflow, APIreference, observability),
docs/users-guide.md(provisional divergencenote),
docs/contents.md(matrix entry).docs/execplans/12-1-1-track-downstream-consumer-boundary.md)marked COMPLETE with all decision and surprise logs updated.
Design decisions incorporated from Logisphere pre-implementation review:
weaver-build-utilto its owncrates/weaver-docs-gateworkspace member.shipped: boolreplaced withshipped_in: Option<String>to capturespecific release tags or commit SHAs.
managed_tasksregistry replaces topic-keyword heuristics;any task absent from the registry causes the gate to fail.
instasnapshot layers removed in favour of byte-for-byteequality checks and
proptest.pending.next_review_byfails the gate when more than 270 days in thepast relative to the manifest build date (computed reproducibly for
deterministic builds).
Test plan
cargo test -p weaver-docs-gate -- boundary_manifest --nocaptureverifies referential integrity across the manifest, roadmap, and
ADR 007 anchors.
cargo test -p weaver-docs-gatecovers DTO mapping, file-loadingerror paths, renderer output, property-based invariants, and the
render_boundary_matrixCLI example.cargo test -p weaver-docs-gate -- compile_timeconfirms thepublic API surface compiles as a downstream caller.
make check-fmt && make lint && make test && make markdownlint && make nixieall pass.References
#154(property-based testing),#153(string-argumentrefactor)