Repository navigation
docs: define the external site publication contract - #222
Conversation
|
Assessment: Comment The validator is strict and well bounded. But two parts of the PR's own goal are not complete. Titles can still drift from the Markdown, and no committed page tells a consumer what the contract is. The CI change also makes every docs-only edit pay for the full Rust matrix. Review categories
Assumptions and rules checked that held
The fixture-mutation tests make each refusal easy to see and easy to extend. |
|
Assessment: Comment (re-review at e9274ba; the earlier review was at 4c1598e) e9274ba fixes two of the three earlier threads. The third is now a documented choice. There is one new non-blocking suggestion inline, about the stability rule in the contract. Status of earlier threads
Assumptions and rules checked that held
The fix for title drift is minimal, and it is pinned by a test. |
|
Assessment: Comment (re-review at 9c4beb2; the previous review was at e9274ba) 9c4beb2 resolves the CI-scope thread. A docs-only edit now runs only the focused Assumptions and rules checked that held
The test that pins the split keeps the change from regressing silently. |
## Problem The Box user guide has no machine-readable publication contract. An external site must copy page routing and metadata by hand, so the two copies can drift and a new user page can remain unpublished. ## Solution Add a schema-versioned preview manifest for every publishable user page. Keep page identity, source, site slug, display metadata, and navigation data in one strict machine contract. Validate the contract in the existing Rust test suite. The test refuses unknown fields, unsafe or missing sources, duplicate identifiers or slugs, invalid navigation positions, and incomplete user-guide coverage. Make manifest and user-page changes select the Rust CI job. The title, description, and navigation strings are publication metadata required by the external site contract. They do not replace the user guide prose. ## Tests `cargo test -p strands-box --test site_manifest --all-features` passed all 8 tests. `cargo fmt --all --check` passed. `cargo clippy --workspace --all-targets --all-features` passed with the allowances in `justfile`. `cargo test --workspace --all-features` passed all non-ignored tests and doctests. `just check` was unavailable because `just` is not installed, so its three checked-in recipes were run directly. The final feature-critic review found no findings.
9c4beb2 to
7e4715e
Compare
|
Assessment: Comment (re-review at 7e4715e; the previous review was at 9c4beb2) 7e4715e is a rebase onto a newer Assumptions and rules checked that held
The CI check of the base manifest is the right place for this rule. |
|
Assessment: Approve-level Comment (re-review at 0ec4a5f; the previous review was at 7e4715e) 0ec4a5f fixes both findings from the last review, and I found nothing new.
Assumptions and rules checked that heldI reproduced each case with
The registry makes every retirement an explicit, reviewed edit, and retired values stay reserved permanently. |
Description
Box documentation changes with the implementation, but external documentation sites currently copy page metadata and navigation by hand. This lets the website and the repository drift.
This change adds a schema-versioned
docs/site-manifest.jsonfor every publishable user page. It gives external consumers stable page IDs, source paths, routes, display metadata, navigation order, and a preview status while Markdown remains the source of truth.A Rust integration test validates the contract, rejects unsafe or incomplete manifests, and requires every
docs/userpage to be declared. A focused Ubuntu CI job runs for manifest, retirement-registry, and publishable-page changes. On pull requests, it compares the base identity contract and append-only retirement registry. Page removals reserve both the old ID and route; route moves reserve the old route while retaining the stable page ID. Retired values cannot be reused. This is an approved machine-readable documentation interface; it does not change a runtime API.Related Issues
None.
Type of Change
New feature
Testing
cargo test -p strands-box --all-featurescargo test -p strands-box --test site_manifest --locked --all-features(27 passed)cargo clippy -p strands-box --all-targets --all-featurescargo fmt -p strands-box --checktest-integ/run.sh(GREEN: 121 passed, 12 declared macOS skips, 0 failed, 0 errors)Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.