Skip to content

Correct users-guide JSON/config claims and document glob - #446

Merged
leynos merged 1 commit into
mainfrom
final-0-1-0-docs-audit
Jul 27, 2026
Merged

Correct users-guide JSON/config claims and document glob#446
leynos merged 1 commit into
mainfrom
final-0-1-0-docs-audit

Conversation

@lodyai

@lodyai lodyai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Assessment of docs/users-guide.md against the currently implemented codebase
found the guide broadly accurate, but surfaced one substantive accuracy error
and a few smaller gaps. This PR corrects them and strengthens example coverage.

Guide fixes (docs/users-guide.md)

  • JSON failure stream (the substantive error). In JSON mode a successful
    command writes a result document to stdout, but a failure writes the
    diagnostic document to stderr with stdout left empty. The guide claimed
    the diagnostic went to stdout. Corrected both the "Control output and
    accessibility" and "JSON output" sections, and relabelled the sample envelope
    as the diagnostic document written to stderr. Matches runner/dispatch.rs
    (result → stdout) vs diagnostic_json.rs (diagnostic → stderr) and the
    existing json_diagnostic_example_matches_live_schema test.
  • Documented glob(pattern), which was registered (manifest/mod.rs) but
    undocumented, even though the README advertises globbing. Added a subsection
    covering its pairing with foreach and its matching semantics.
  • --jobs value name aligned with the CLI: <N> (accepts 1 to 64) rather
    than <1..64>.
  • Config precedence clarified: system/user configuration are discovered from
    XDG/home conventions rather than two separately named Netsuke layers.

Test coverage

guide-command-available-manifest was previously only compiled via generate,
never asserting which when/command_available branch was selected. Added a
unix e2e test (command_available_selects_the_documented_action_branch) that
pins both branches deterministically by isolating PATH — a stub cargo-nextest
present vs absent — and asserts the resulting action command
(cargo nextest run vs cargo test).

Follow-up

Issue #443 tracks a dedicated, comprehensive docs/stdlib-yaml-and-jinja-guide.md
with executable examples for the full template standard library (path/hash/time/
fetch/shell/grep/file tests), linked from the user's guide and README.

Quality gates

check-fmt, markdownlint (+ en-GB-oxendict spelling), lint (clippy + Whitaker
dylint), and full make test all pass locally with zero failures.

References

@sourcery-ai sourcery-ai Bot 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.

Sorry @LodyAI[bot], you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The user guide documents glob expansion, command-line limits, configuration discovery, and JSON stream behaviour. End-to-end tests validate manifest action selection when cargo-nextest is available or absent.

Changes

Guide and documentation examples

Layer / File(s) Summary
Document globbing and runtime options
docs/users-guide.md
Document glob(pattern) expansion, wildcard semantics, the 1–64 --jobs range, and platform-based configuration discovery.
Document JSON output streams
docs/users-guide.md
Specify versioned success documents on stdout, diagnostic documents on stderr, and generated content embedded in result.content.
Validate documented command selection
tests/documentation_examples_e2e_tests.rs
Use an isolated PATH to verify that manifest generation selects the cargo nextest run or cargo test branch according to command availability.

Possibly related PRs

Suggested labels: Issue

Suggested reviewers: leynos, codescene-access

Poem

Glob stars bloom through files,
JSON streams find their course,
Nextest waits—or tests arise,
Docs and checks march in one source.

🚥 Pre-merge checks | ✅ 20
✅ Passed checks (20 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Testing (Overall) ✅ Passed The new e2e test isolates PATH, stubs cargo-nextest, and asserts both present/absent branches in the generated manifest, so it would fail under inverted or constant implementations.
User-Facing Documentation ✅ Passed PASS: docs/users-guide.md covers the new glob() helper, JSON stream semantics, config discovery, and --jobs; no sibling locale guide needs syncing.
Developer Documentation ✅ Passed Only user-guide text and tests changed; no internal APIs, architecture, ADRs, roadmap items, or locale docs were added or altered.
Module-Level Documentation ✅ Passed tests/documentation_examples_e2e_tests.rs and the related helper module both carry module docstrings; no new undocumented module was introduced.
Testing (Unit And Behavioural) ✅ Passed PASS: The unit tests cover command_available branches with a mocked Jinja env, and the e2e test runs the built netsuke binary with an isolated PATH, exercising the real CLI boundary.
Testing (Property / Proof) ✅ Passed The patch is docs plus a two-branch e2e regression; it adds no new broad invariant or proof obligation, and existing tests already cover glob and command_available edge cases.
Testing (Compile-Time / Ui) ✅ Passed No compile-time Rust/TS behaviour changed; the new e2e test is runtime-only and the diff adds no snapshot surface requiring trybuild or Insta.
Unit Architecture ✅ Passed PASS: the new e2e helper isolates PATH explicitly and returns Result, and command_available already uses an injected resolver; no hidden writes or ambient dependencies were added.
Domain Architecture ✅ Passed PASS: The patch only changes docs and integration tests; no domain model, repository, transport, or persistence code was altered.
Observability ✅ Passed Only docs and tests changed; no runtime behaviour, logging, metrics, tracing, or alerts were introduced or altered.
Security And Privacy ✅ Passed PASS: this change only updates docs and adds deterministic fake PATH stubs; it exposes no secrets, auth gaps, or sensitive data.
Performance And Resource Use ✅ Passed PASS: The PR is docs-plus-test only; the new helper performs two bounded manifest generations with isolated PATH and no unbounded loops, batching, or repeated I/O.
Concurrency And State ✅ Passed No shared mutable state or async concurrency was introduced; the new test isolates PATH via env_clear and temp workspaces.
Architectural Complexity And Maintainability ✅ Passed PASS: The PR adds only a small private test helper plus one test, reusing existing test utilities; no new layers, traits, registries, or dependencies were introduced.
Rust Compiler Lint Integrity ✅ Passed PASS: The touched Rust test adds a used helper and test; no new lint suppressions or .clone() calls appear in the diff, and imports resolve to real uses.
Title check ✅ Passed The title clearly matches the PR’s documentation fixes and test coverage for users-guide JSON, config, and glob behaviour.
Description check ✅ Passed The description is directly about the same guide corrections and e2e test additions made in this changeset.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch final-0-1-0-docs-audit

Comment @coderabbitai help to get the list of available commands.

codescene-access[bot]

This comment was marked as outdated.

@lodyai
lodyai Bot force-pushed the final-0-1-0-docs-audit branch from 0bf7c44 to f17507a Compare July 27, 2026 10:59
codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

@leynos
leynos marked this pull request as ready for review July 27, 2026 11:27

@sourcery-ai sourcery-ai Bot 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.

Sorry @leynos, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f17507adb2

ℹ️ 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".

Comment thread docs/users-guide.md Outdated
Assessment of docs/users-guide.md against the implemented codebase surfaced
one substantive accuracy error and some smaller gaps:

- JSON mode: success writes a result document to stdout, but failure writes
  the diagnostic document to stderr (stdout empty). The guide claimed the
  diagnostic went to stdout. Correct both the output-streams and JSON-output
  sections and clarify the sample envelope is emitted on stderr.
- Document the glob(pattern) manifest function, which was registered but
  undocumented (README already advertises globbing). Add a subsection covering
  its pairing with foreach and its matching semantics.
- Match the documented --jobs value name to the CLI (<N>, accepts 1 to 64).
- Clarify that system/user configuration come from XDG/home conventions rather
  than two separately named Netsuke layers.

Also strengthen example coverage: guide-command-available-manifest was only
compiled via generate. Add a unix e2e test that pins both when/command_available
branches deterministically by isolating PATH (stub cargo-nextest present vs
absent) and asserting the selected action command.

Follow-up issue #443 tracks a dedicated stdlib guide with executable examples.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lodyai
lodyai Bot force-pushed the final-0-1-0-docs-audit branch from f17507a to 110d8f5 Compare July 27, 2026 11:41
codescene-access[bot]

This comment was marked as outdated.

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No quality gates enabled for this code.

@leynos

leynos commented Jul 27, 2026

Copy link
Copy Markdown
Owner

@coderabbitai resume

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Reviews resumed.

@buzzybee-df12

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot added the Issue label Jul 27, 2026
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@leynos

leynos commented Jul 27, 2026

Copy link
Copy Markdown
Owner

@coderabbitai resume

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Reviews resumed.

@leynos
leynos merged commit d1266b8 into main Jul 27, 2026
21 checks passed
@leynos
leynos deleted the final-0-1-0-docs-audit branch July 27, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants