Repository navigation
docs: add plain Wesley onboarding path - #686
flyingrobots merged 28 commits into
Conversation
📝 WalkthroughWalkthroughThis PR enforces duplicate non-repeatable directive rejection during SDL lowering while preserving arrays for repeatable directives, adds extensive documentation (Plain Wesley onboarding, Assurance Capability Matrix, External Target Protocol MVP, security tooling policy, first-PR contributor path), and introduces ChangesSDL Directive Repeatability Lowering
Documentation Onboarding and Vocabulary Governance
Rust-Native IR Benchmark Tooling
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related issues
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c576d292d0
ℹ️ 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".
…sture docs: document security tooling posture
…ive-collisions fix(core): reject duplicate nonrepeatable directives
…aths docs: add first contributor fast paths
…e-baseline feat(xtask): add IR benchmark evidence command
…ol-mvp docs: specify external target protocol MVP
…atrix docs: publish assurance capability matrix
🔍 The Case of Pull Request #686Schema Sets
Schema Set
|
Activity Summary
Validation:
Merge gate note: all GitHub Actions checks are passing; CodeRabbit is still queued at the time of this summary. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
crates/wesley-core/src/adapters/apollo.rs (1)
908-960: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider consolidating the near-duplicate argument-extraction pipelines.
field_argument_from_input_valueandoperation_argument_from_input_valueare structurally identical (name/type extraction, default value parsing, directive extraction), differing only in the returned struct type (FieldArgumentvsOperationArgument). This PR had to apply the samerepeatable_directivesthreading change to both independently — a sign that future directive/argument logic changes will need to be kept in sync manually across two call sites.♻️ Possible consolidation approach
+struct ArgumentParts { + name: String, + description: Option<String>, + r#type: TypeReference, + default_value: Option<serde_json::Value>, + directives: IndexMap<String, serde_json::Value>, +} + +fn argument_parts_from_input_value( + input_value: cst::InputValueDefinition, + area: &'static str, + repeatable_directives: &BTreeSet<String>, +) -> Result<ArgumentParts, WesleyError> { + // shared name/type/default_value/directives extraction +}Then
field_argument_from_input_valueandoperation_argument_from_input_valuebecome thin wrappers mappingArgumentPartsinto their respective structs.Also applies to: 3547-3670
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/wesley-core/src/adapters/apollo.rs` around lines 908 - 960, The argument-extraction logic is duplicated between field and operation handling, so future changes must be applied in two places. Factor the shared name/type/default-value/directive parsing out of field_argument_from_input_value and operation_argument_from_input_value into a common helper or ArgumentParts builder, then keep each function as a thin wrapper that maps the shared result into FieldArgument or OperationArgument. Preserve the repeatable_directives threading through ApolloLoweringAdapter::extract_directives_with_repeatability and the existing error handling.xtask/src/main.rs (1)
3133-3155: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueMinor:
command_labelcomputed twice.
run_commandnow computescommand_label(program, args)only to discard it before delegating torun_command_no_label, which recomputes the same label. Passing the already-computed label through would avoid the redundant formatting, though the cost is negligible here.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@xtask/src/main.rs` around lines 3133 - 3155, `run_command` and `run_command_no_label` are computing the same `command_label(program, args)` twice; avoid the redundant formatting by passing the already-computed label from `run_command` into `run_command_no_label` (or otherwise reusing it) so the shared command string is created once and used consistently in the spawn error and `CommandFailed` path.docs/topics/docs-maintenance.md (1)
20-21: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep this rule aligned with the canonical vocabulary policy.
This narrows the standard by dropping the “link to a definition page” option, which makes the maintenance guide drift from
docs/governance/DOCUMENTATION_STANDARD.md.♻️ Suggested tweak
-- Give every new public noun a plain-English alias, or mark it -- internal/experimental near its first use. +- Follow the vocabulary rule in `docs/governance/DOCUMENTATION_STANDARD.md`: + give new public nouns a plain-English alias, link to a definition page, or + mark them internal/experimental near first use.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/topics/docs-maintenance.md` around lines 20 - 21, The docs-maintenance rule is out of sync with the canonical vocabulary policy because it removes the “link to a definition page” option. Update the guidance in docs-maintenance to match the policy in DOCUMENTATION_STANDARD by allowing the same supported pattern for new public nouns, and keep the wording aligned with the existing public noun/vocabulary rules rather than narrowing it.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/reference/external-target-protocol.md`:
- Around line 89-91: Tighten the `command.program` guidance in the external
target protocol docs so “descriptor-relative” is not ambiguous about unsafe
paths. Update the wording around the relevant `command.program` rules to
explicitly reject `../` traversal, symlink escape, and other
canonicalization-based bypasses before launch, and keep the existing
deterministic-resolution constraint aligned with the `command.program` contract.
---
Nitpick comments:
In `@crates/wesley-core/src/adapters/apollo.rs`:
- Around line 908-960: The argument-extraction logic is duplicated between field
and operation handling, so future changes must be applied in two places. Factor
the shared name/type/default-value/directive parsing out of
field_argument_from_input_value and operation_argument_from_input_value into a
common helper or ArgumentParts builder, then keep each function as a thin
wrapper that maps the shared result into FieldArgument or OperationArgument.
Preserve the repeatable_directives threading through
ApolloLoweringAdapter::extract_directives_with_repeatability and the existing
error handling.
In `@docs/topics/docs-maintenance.md`:
- Around line 20-21: The docs-maintenance rule is out of sync with the canonical
vocabulary policy because it removes the “link to a definition page” option.
Update the guidance in docs-maintenance to match the policy in
DOCUMENTATION_STANDARD by allowing the same supported pattern for new public
nouns, and keep the wording aligned with the existing public noun/vocabulary
rules rather than narrowing it.
In `@xtask/src/main.rs`:
- Around line 3133-3155: `run_command` and `run_command_no_label` are computing
the same `command_label(program, args)` twice; avoid the redundant formatting by
passing the already-computed label from `run_command` into
`run_command_no_label` (or otherwise reusing it) so the shared command string is
created once and used consistently in the spawn error and `CommandFailed` path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 13b61c8d-b827-400e-b01d-8495e4bfe944
📒 Files selected for processing (36)
CHANGELOG.mdCONTRIBUTING.mdREADME.mdSECURITY.mdcrates/wesley-core/src/adapters/apollo.rscrates/wesley-core/tests/lowering_validation.rsdocs/ARCHITECTURE.mddocs/END_TO_END.mddocs/GUIDE.mddocs/README.mddocs/design/0013-rust-ir-parity-sentinel/EVIDENCE_rust-core-performance-baseline.mddocs/design/0013-rust-ir-parity-sentinel/SOURCE_wesley-core-rs-ir-contract-and-fixtures.mddocs/design/0013-rust-ir-parity-sentinel/rust-ir-parity-sentinel.mddocs/design/0015-resilience-policy-boundary/resilience-policy-boundary.mddocs/design/0016-rust-core-binding-observatory/EVIDENCE_rust-core-binding-and-memory-baselines.mddocs/design/0016-rust-core-binding-observatory/rust-core-binding-observatory.mddocs/design/0017-rust-native-front-door-and-node-retirement/PARITY_SENTINEL_ARCHIVE.mddocs/governance/DOCUMENTATION_STANDARD.mddocs/guides/extending.mddocs/guides/module-authoring.mddocs/reference/assurance-capability-matrix.mddocs/reference/directives.mddocs/reference/external-target-protocol.mddocs/reference/project-manifest.mddocs/topics/README.mddocs/topics/assurance-evidence.mddocs/topics/ci-workflows.mddocs/topics/contributing/first-pr.mddocs/topics/docs-maintenance.mddocs/topics/docs-orientation.mddocs/topics/extension-modules.mddocs/topics/plain-wesley.mddocs/topics/security-tooling.mddocs/topics/validation.mddocs/truth-manifest.jsonxtask/src/main.rs
Activity Summary
Validation:
|
39ea577
into
hardening/rust-validator-literals
Summary
Closes #678.
Stacked on #685. This PR's original slice is the Plain Wesley onboarding/docs issue. During stack landing, already-merged descendant slices are now present in the branch diff until #686 is merged downward.
Why
The docs needed a first-hour path that explains Wesley in standard GraphQL terms before introducing advanced assurance vocabulary. This reduces onboarding friction while preserving the domain-empty compiler boundary.
Changes
docs/topics/plain-wesley.mdas a first-hour compiler path using standard GraphQL and generated-artifact language.versionandtypes, not unsetmetadata.docs/GUIDE.md, the docs front door, docs orientation, and the topics map.Method Evidence
cf0730e5.55acf17b,0856f2b7,70878ba9,84134ff0.wesley schema lower --jsonrun...traversal, symlink escapes, and canonicalization escapes before launch.Tracker Hygiene
Risk
Low to medium. Most changes are documentation-only; one stacked cleanup refactors shared argument extraction and is covered by
wesley-coreintegration tests plus full preflight.Backout
Revert this PR, or revert individual follow-up commits if one cleanup needs to be separated from the onboarding slice.
Testing
docs/topics/plain-wesley.mdstill claimedmetadataas an expected top-level key.metadata.wesley schema lower --jsonoutput includesversionandtypesand omitsmetadatafor the tutorial schema.pnpm exec prettier --check docs/topics/plain-wesley.mdcargo xtask docs-checkcargo test -p wesley-core --test lowering_validation -- --nocapturecargo test -p wesley-core --test operation_analysis -- --nocapturecargo test -p xtaskcargo clippy -p wesley-core --all-targets -- -D warningsgit diff --checkpnpm run preflightChecklist