Skip to content

Redact JSON catalogue version (#569) - #611

Open
leynos wants to merge 5 commits into
mainfrom
issue-569-redact-version-number-in-json-catalogue-help-snapshot
Open

Redact JSON catalogue version (#569)#611
leynos wants to merge 5 commits into
mainfrom
issue-569-redact-version-number-in-json-catalogue-help-snapshot

Conversation

@leynos

@leynos leynos commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #569.

This branch redacts Netsuke's generator version in the JSON help catalogue
snapshot, so release-version bumps do not update an otherwise unchanged
fixture. It retains the complete JSON assertion, gives the text catalogue
refactor its own follow-up commit, property-tests the redaction range, and
records the contributor contract for JSON and text snapshot settings.

Review walkthrough

Validation

  • make check-fmt: passed
  • make lint: passed
  • make doc-coverage: passed at 98.98%
  • make test: 2,410 non-doctests and all doctests passed
  • make markdownlint: passed
  • make nixie: passed
  • Focused generator-redaction property test: passed

Backlinks

References

Summary by Sourcery

Stabilize JSON catalogue snapshots by redacting release-dependent generator versions while retaining complete behavioural assertions.

Enhancements:

  • Redact Netsuke's generator version from JSON help-catalogue snapshots while preserving assertions for all other catalogue content and version fields.
  • Centralize generator-version redaction settings for JSON diagnostics and help-target catalogues, keeping text catalogue snapshots unfiltered.
  • Add property coverage to verify SemVer redaction remains scoped to the Netsuke generator object.

Documentation:

  • Document the required snapshot settings and redaction rules for JSON diagnostics, JSON help catalogues, and text catalogues.

Tests:

  • Add property-based tests covering generator-version redaction across SemVer variants and unrelated version fields.

Reuse the generator-version snapshot filter for JSON help catalogues so
release version bumps do not update an otherwise unchanged fixture.
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 909472cb-0df8-425b-9bb1-1c220dc3db30

📥 Commits

Reviewing files that changed from the base of the PR and between e041243 and e066eab.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • Cargo.toml
  • docs/developers-guide.md
  • docs/snapshot-testing-in-netsuke-using-insta.md
  • src/snapshot_test_support.rs
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/monotony (auto-detected)
  • leynos/rstest-bdd (auto-detected)
  • leynos/whitaker (auto-detected)
  • leynos/ortho-config (auto-detected)
  • leynos/lading (auto-detected)
  • leynos/shared-actions (auto-detected)

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


Summary

  • Redact the Netsuke generator version from JSON catalogue snapshots.
  • Reuse the redaction settings for diagnostic JSON and JSON help-target snapshots.
  • Centralize text catalogue snapshot rendering through a themed helper.
  • Keep JSON snapshot handling separate from text snapshot handling.
  • Preserve existing locales, themes, snapshot names, and coverage.
  • Document the scoped JSON redaction settings and their snapshot contracts.

Resolves #569.

Validation

  • make check-fmt
  • make test
  • make doc-coverage
  • make lint
  • Markdown linting
  • Nixie
  • Focused generator-redaction property tests

Walkthrough

Centralise JSON snapshot version redaction. Pass snapshot settings into catalogue rendering. Reuse shared text rendering for text-based help snapshots. Keep text catalogue settings unfiltered.

Changes

Snapshot settings

Layer / File(s) Summary
Centralise JSON version redaction
src/snapshot_test_support.rs, Cargo.toml, docs/developers-guide.md, docs/snapshot-testing-in-netsuke-using-insta.md
Add a shared filter for the Netsuke generator version. Apply it to diagnostic-JSON and JSON help-target settings. Test semantic-version variants and preserve unrelated version fields. Document the scoped policy.
Wire settings into snapshot tests
src/runner/help_tests.rs
Pass caller-provided Settings to catalogue_snapshot. Route text snapshots through shared themed rendering and use dedicated JSON settings for JSON snapshots.

Suggested labels: Issue

Poem

Redact the version, keep snapshots bright.
Share the settings, render them right.
Let themed text follow its flow.
Keep JSON details steady in tow.
Run each snapshot, clean and clear.

Merge Risk: ⚪ Minimal · up to e066e

The PR changes snapshot-test redaction and documentation behavior without introducing an actionable merge-blocking risk; it is merge-ready after normal checks and review.

🚥 Pre-merge checks | ✅ 20
✅ Passed checks (20 passed)
Check name Status Explanation
Title check ✅ Passed The title identifies the JSON catalogue version redaction and references linked issue #569.
Description check ✅ Passed The description clearly explains the redaction, snapshot-setting changes, text rendering refactor, documentation, and validation results.
Linked Issues check ✅ Passed The changes satisfy issue #569 by redacting the Netsuke generator version in the JSON catalogue snapshot, preserving the remaining assertions, and adding property coverage for scoped redaction.
Out of Scope Changes check ✅ Passed The text catalogue refactor, documentation, and tests directly support the snapshot changes and the review objectives. No unrelated changes are evident.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 2 files. (3 skipped: 3…
Testing (Overall) ✅ Passed Mark Testing (Overall) as PASS. The JSON catalogue test renders the real build_catalogue/render_json path, binds help_targets_json_snapshot_settings, and compares the complete fixture. The fixtu…
User-Facing Documentation ✅ Passed Pass this check. The pull request changes test-only snapshot infrastructure and the expected JSON snapshot. src/snapshot_test_support.rs is behind #[cfg(test)], src/runner/help_tests.rs only cha…
Developer Documentation ✅ Passed PASS — The pull request documents the changed snapshot-test APIs and boundary. docs/developers-guide.md now records that src/snapshot_test_support.rs owns the JSON settings, identifies both specia…
Module-Level Documentation ✅ Passed Pass the module-level documentation check. The two changed Rust modules have clear //! documentation. help_tests.rs states its snapshot-testing purpose and renderer scope. `snapshot_test_support.r…
Testing (Unit And Behavioural) ✅ Passed Pass the testing check. The PR adds a property-based invariant test for SemVer variants and preservation of unrelated version fields, and it parses the filtered result as JSON. The JSON catalogue snap…
Testing (Property / Proof) ✅ Passed Pass. The changed code introduces a range-based invariant: redact only Netsuke's generator SemVer while preserving JSON structure and unrelated version fields. src/snapshot_test_support.rs adds a Ru…
Testing (Compile-Time / Ui) ✅ Passed Pass the testing check. The pull request adds snapshot coverage for the structured JSON help catalogue and preserves the three focused text snapshots. The JSON snapshot retains schema_version, gener…
Unit Architecture ✅ Passed PASS. The PR changes only #[cfg(test)] snapshot support, help-rendering tests, fixtures, documentation, and a dev-only regex dependency. catalogue_snapshot keeps fallible fixture parsing and ren…
Domain Architecture ✅ Passed Pass the Domain Architecture check. The complete diff from the PR predecessor changes only snapshot tests/support, snapshot fixtures, a development dependency, and documentation. src/lib.rs declares…
Observability ✅ Passed Classify this change as test-only. The pull-request range changes src/runner/help_tests.rs, src/snapshot_test_support.rs (included under #[cfg(test)]), snapshot fixtures, documentation, and the …
Security And Privacy ✅ Passed The pull request only changes test snapshot settings, test helpers, a development-only regex dependency, documentation, and one fixture value. The new filter uses fixed literals and a static regex t…
Performance And Resource Use ✅ Passed Accept the change. The executable changes are limited to snapshot-test helpers and property tests. The text helper preserves the existing one render per test, and the JSON filter runs only during one …
Concurrency And State ✅ Passed Classify this check as PASS. The PR adds only per-call insta::Settings, a synchronous redaction helper, and a text-rendering helper. The changed lines add no async tasks, background work, locks, cha…
Architectural Complexity And Maintainability ✅ Passed Keep the change. The new abstractions have immediate, concrete reuse: text_catalogue_snapshot_with_theme replaces three duplicated rendering closures, catalogue_snapshot accepts explicit `Settings…
Rust Compiler Lint Integrity ✅ Passed Pass this check. The pull-request diff adds no broad dead_code, unused_imports, or unused suppression, no artificial lint anchor, and no clone() call. The new private filter helper is used by …
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 2 files. (3 skipped: 3 unsupported.)

Full details: Testing (Overall)

Explanation

Mark Testing (Overall) as PASS. The JSON catalogue test renders the real build_catalogue/render_json path, binds help_targets_json_snapshot_settings, and compares the complete fixture. The fixture retains schema_version, generator name, command, actions, targets, descriptions, and defaults while requiring [version]; removing or bypassing the filter fails this assertion. The shared filter also has property coverage across generated SemVer forms, valid JSON parsing, and preservation of an unrelated version field. Existing diagnostic snapshots exercise the same shared filter through real Settings. The three text snapshots still exercise separate locale and theme inputs through the shared helper, so the refactor remains covered by meaningful output oracles.

Full details: User-Facing Documentation

Explanation

Pass this check. The pull request changes test-only snapshot infrastructure and the expected JSON snapshot. src/snapshot_test_support.rs is behind #[cfg(test)], src/runner/help_tests.rs only changes test wiring, and src/runner/help.rs has no pull-request changes. The JSON redaction affects snapshot comparison only; it does not change the user-facing netsuke help targets --json output. No docs/users-guide.md update is required. The contributor documents the internal contract in the developer guide and snapshot-testing guide.

Full details: Developer Documentation

Explanation

PASS — The pull request documents the changed snapshot-test APIs and boundary. docs/developers-guide.md now records that src/snapshot_test_support.rs owns the JSON settings, identifies both specialised builders, requires JSON callers to use them, and requires text catalogue snapshots to remain unfiltered. docs/snapshot-testing-in-netsuke-using-insta.md records the same contract and redaction scope. The change adds no production architecture, roadmap completion, new execplan, ADR decision, or external build tool. The regex entry is a Cargo test dependency, not a separately installed tooling requirement. No alternate developer-guide locale exists.

Full details: Module-Level Documentation

Explanation

Pass the module-level documentation check. The two changed Rust modules have clear //! documentation. help_tests.rs states its snapshot-testing purpose and renderer scope. snapshot_test_support.rs states its shared-helper purpose and relationship to other test modules. The newly added tests module also has //! documentation describing its verification purpose. No undocumented module declaration was introduced.

Full details: Testing (Unit And Behavioural)

Explanation

Pass the testing check. The PR adds a property-based invariant test for SemVer variants and preservation of unrelated version fields, and it parses the filtered result as JSON. The JSON catalogue snapshot exercises the build_cataloguerender_json path with the new JSON-only Settings; the text snapshots continue to use unfiltered settings. Existing integration tests already exercise the --json help targets command boundary. The PR changes test support and documentation only, so it does not introduce a new externally observable workflow that requires an additional end-to-end test.

Full details: Testing (Property / Proof)

Explanation

Pass. The changed code introduces a range-based invariant: redact only Netsuke's generator SemVer while preserving JSON structure and unrelated version fields. src/snapshot_test_support.rs adds a Rust proptest that generates major, minor, patch, pre-release, build-metadata, and unrelated-version values. It applies the shared filter, parses the result as JSON, and asserts both redaction and preservation. The property test is substantive and directly covers the introduced invariant.

Full details: Testing (Compile-Time / Ui)

Explanation

Pass the testing check. The pull request adds snapshot coverage for the structured JSON help catalogue and preserves the three focused text snapshots. The JSON snapshot retains schema_version, generator name, command, actions, targets, descriptions, and default flags, while redacting only the release-dependent Netsuke generator version. serde_json::to_string_pretty supplies stable field ordering, and the scoped filter plus property test verifies that unrelated version fields remain visible. No compile-time API or UI behaviour requires a trybuild-equivalent test.

Full details: Unit Architecture

Explanation

PASS. The PR changes only #[cfg(test)] snapshot support, help-rendering tests, fixtures, documentation, and a dev-only regex dependency. catalogue_snapshot keeps fallible fixture parsing and rendering explicit through Result, while snapshot binding is visible at the named test boundary. add_generator_version_filter only configures insta::Settings; the property test handles both regex construction and JSON parsing errors explicitly. The new themed helper separates text rendering from the JSON-specific settings path. No query or command path, production dependency, network call, hidden clock, persistence operation, or new global state is introduced. The diff also shows that the existing localizer/global-state test setup is unchanged.

Full details: Domain Architecture

Explanation

Pass the Domain Architecture check. The complete diff from the PR predecessor changes only snapshot tests/support, snapshot fixtures, a development dependency, and documentation. src/lib.rs declares snapshot_test_support under #[cfg(test)], so insta::Settings, regex filtering, and filesystem-based snapshot paths remain test infrastructure. src/runner/help_tests.rs passes settings only to assert_snapshot!; it does not add transport, persistence, or adapter dependencies to domain code. No explicit architecture failure condition is introduced.

Full details: Observability

Explanation

Classify this change as test-only. The pull-request range changes src/runner/help_tests.rs, src/snapshot_test_support.rs (included under #[cfg(test)]), snapshot fixtures, documentation, and the regex development dependency. It does not change production request, process, storage, network, or asynchronous behaviour. Therefore, it introduces no operational failure mode that requires logs, metrics, tracing, or alerts.

Full details: Security And Privacy

Explanation

The pull request only changes test snapshot settings, test helpers, a development-only regex dependency, documentation, and one fixture value. The new filter uses fixed literals and a static regex to replace only Netsuke's generator version with [version]; it does not add secrets, credentials, trust-boundary checks, permissions, external inputs, or sensitive data exposure.

Full details: Performance And Resource Use

Explanation

Accept the change. The executable changes are limited to snapshot-test helpers and property tests. The text helper preserves the existing one render per test, and the JSON filter runs only during one snapshot bind. Property-test inputs are bounded: prerelease and build identifiers are at most 32 characters, unrelated versions are at most 64 characters, and each case uses a fixed small JSON document. The regex dependency is dev-only, and no new production loops, unbounded collections, blocking I/O, retries, or hot-path work were introduced.

Full details: Concurrency And State

Explanation

Classify this check as PASS. The PR adds only per-call insta::Settings, a synchronous redaction helper, and a text-rendering helper. The changed lines add no async tasks, background work, locks, channels, shared mutable state, transactions, or ordering protocol. The existing process-global localizer and its Mutex remain unchanged; rendering still holds the existing test lock and releases it before snapshot work. The new property test is pure and has no interleaving or lifetime risk. No explicit failure condition from the concurrency and state policy is introduced.

Full details: Architectural Complexity And Maintainability

Explanation

Keep the change. The new abstractions have immediate, concrete reuse: text_catalogue_snapshot_with_theme replaces three duplicated rendering closures, catalogue_snapshot accepts explicit Settings for the text and JSON paths, and add_generator_version_filter serves the two JSON settings builders. src/snapshot_test_support.rs is the existing test-support boundary and remains test-only; no dependency cycle or global state was introduced. The regex dev-dependency supports direct property testing of the filter and was already present in Cargo.lock, so it adds no new transitive package. The specialised JSON builder and its permitted redaction scope are documented. No explicit architectural complexity failure condition is introduced.

Full details: Rust Compiler Lint Integrity

Explanation

Pass this check. The pull-request diff adds no broad dead_code, unused_imports, or unused suppression, no artificial lint anchor, and no clone() call. The new private filter helper is used by both specialised settings builders. The new public(crate) JSON settings builder is used by json_catalogue_snapshot. The shared support module remains behind #[cfg(test)], so the added property test does not widen the production module graph. The catalogue helper borrows &Settings and the changed code adds no avoidable ownership transfer. git diff --check also reports no patch errors.

✨ 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 issue-569-redact-version-number-in-json-catalogue-help-snapshot

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

@sourcery-ai

sourcery-ai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

The PR makes JSON snapshot tests resilient to Netsuke generator version bumps by sharing the existing generator-scoped redaction filter, applying it only to diagnostic JSON and JSON help-catalogue snapshots, and updating the JSON fixture accordingly; text catalogue snapshots remain unchanged and fully versioned.

File-Level Changes

Change Details Files
Centralize generator-version redaction and apply it selectively to JSON snapshots.
  • Extract the existing generator-object version filter into a shared helper.
  • Extend diagnostic JSON settings and add dedicated JSON help-catalogue settings with the filter.
  • Preserve the existing unfiltered settings for text, accessible, and localized catalogue snapshots.
src/snapshot_test_support.rs
src/runner/help_tests.rs
Update the JSON help catalogue fixture to use a stable version placeholder.
  • Replace the generated Netsuke version with [version] while retaining assertions for the remaining catalogue fields.
src/snapshots/help_targets/netsuke__runner__help__tests__json_catalogue.snap

Assessment against linked issues

Issue Objective Addressed Explanation
#569 Redact the concrete Netsuke generator version in the JSON catalogue help snapshot.
#569 Ensure version bumps do not require updating the JSON catalogue snapshot while preserving assertions for the remaining output.
#569 Apply the redaction specifically to the JSON help catalogue without altering text catalogue snapshot behavior.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

@leynos

leynos commented Aug 28, 2026

Copy link
Copy Markdown
Owner Author

@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 in a code block that I can paste into the CodeScene web ui's diagnostic suppression function so this diagnostic can be silenced.

src/runner/help_tests.rs

Comment on lines +156 to +166

    catalogue_snapshot(
        "en-US",
        "text_catalogue",
        &snapshot_settings("help_targets"),
        |manifest| {
            Ok(normalize_fluent_isolates(&render_text(
                &build_catalogue(manifest),
                theme_prefs(ThemePreference::Unicode),
            )))
        },
    )

❌ New issue: Code Duplication
The module contains 3 functions with similar structure: accessible_catalogue_snapshot,localized_catalogue_snapshot,text_catalogue_snapshot

@coderabbitai

This comment was marked as resolved.

Route each text catalogue snapshot through one themed helper while keeping
the JSON catalogue redaction path separate.
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 August 28, 2026 14:11

@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've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 3 hours and 44 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@coderabbitai coderabbitai Bot added the Issue label Aug 28, 2026

@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: e0412438ff

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

///
/// Anchor the filter on the enclosing generator object so unrelated versioned
/// content remains visible in snapshot diffs.
fn add_generator_version_filter(settings: &mut Settings) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Document the shared generator-redaction abstraction

The new reusable add_generator_version_filter abstraction is introduced without updating the contributor documentation that defines its ownership and reuse policy. docs/snapshot-testing-in-netsuke-using-insta.md still describes generator-version filtering as diagnostic-JSON-only, leaving the new help-target settings path undiscoverable; document the abstraction's scope, permitted callers, and composition rules in the relevant guide.

AGENTS.md reference: AGENTS.md:L111-L119

Useful? React with 👍 / 👎.

Comment thread src/runner/help_tests.rs
Comment on lines +114 to +115
/// Render and assert a text catalogue snapshot with a selected theme.
fn text_catalogue_snapshot_with_theme(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Split the text-catalogue refactor into a follow-up

This helper refactors three existing text snapshot tests but is bundled with the functional JSON-version redaction fix. That prevents the behavioural fix and unrelated deduplication from being reviewed, reverted, or bisected independently; move this refactor to a separate follow-up commit after the fix.

AGENTS.md reference: AGENTS.md:L120-L128

Useful? React with 👍 / 👎.

leynos added 2 commits August 28, 2026 18:34
Exercise the shared filter across generated SemVer variants while
preserving unrelated version fields and valid JSON output.
Define the generator-version filter ownership and the separate JSON and
text snapshot-settings contracts for contributors.
codescene-access[bot]

This comment was marked as outdated.

leynos commented Aug 28, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai Review reconciliation for the current head:

  • Commit separation: skipped as stale. The text-catalogue refactor is already isolated in follow-up commit e0412438, after functional redaction commit 0046af7c.
  • Developer documentation: fixed in 05773f33; the contributor and snapshot guides now define the shared redaction ownership, allowed JSON builders, and unfiltered text path.
  • Property coverage: fixed in 3598d2c6; generated SemVer variants reuse the production filter constants, preserve unrelated versions, and parse as valid JSON.
  • Linked issue check: verified. The JSON fixture contains "version": "[version]" and retains all other assertions.

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- current head and named commits ---'
git rev-parse --short HEAD
git log --oneline --decorate -30
for commit in e0412438 0046af7c 05773f33 3598d2c6; do
  printf '\ncommit %s\n' "$commit"
  git show -s --format='%H%n%P%n%s' "$commit"
done

printf '%s\n' '--- relevant Rust declarations ---'
ast-grep outline src/runner/help_tests.rs --items all --type function --view expanded
ast-grep outline src/snapshot_test_support.rs --items all --view expanded

printf '%s\n' '--- catalogue helpers and test entry points ---'
rg -n -A38 -B6 \
  'fn (catalogue_snapshot|text_catalogue_snapshot_with_theme|text_catalogue_snapshot|accessible_catalogue_snapshot|localized_catalogue_snapshot|json_catalogue_snapshot)\s*\(' \
  src/runner/help_tests.rs

printf '%s\n' '--- JSON redaction constants, settings, and property tests ---'
rg -n -A32 -B8 \
  '(VERSION|version|filter|help_targets_json_snapshot_settings|diagnostic_json_snapshot_settings|proptest|prop_compose)' \
  src/snapshot_test_support.rs src \
  -g '*.rs'

printf '%s\n' '--- documentation references ---'
rg -n -i -A10 -B4 \
  '(snapshot|redact|redaction|generator.version|help.targets|json builder|unfiltered text)' \
  README.md docs .github \
  -g '*.md' -g '*.mdx' -g '*.rst' 2>/dev/null || true

printf '%s\n' '--- fixture version placeholders ---'
rg -n -A5 -B5 '"version"[[:space:]]*:[[:space:]]*"(\\[version\\]|[0-9])' \
  . -g '*.snap' -g '*.json' -g '*.txt' 2>/dev/null || true

Length of output: 2132


🏁 Script executed:

#!/bin/bash
set -u

printf '%s\n' '--- PR `#611` commits from GitHub ---'
gh pr view 611 --repo leynos/netsuke --json commits \
  --jq '.commits[] | [.oid[0:8], .messageHeadline] | `@tsv`' || true

printf '%s\n' '--- help test function outline ---'
ast-grep outline src/runner/help_tests.rs --items all --type function --view expanded || true

printf '%s\n' '--- text and JSON catalogue test implementations ---'
rg -n -A42 -B6 \
  'fn (catalogue_snapshot|text_catalogue_snapshot_with_theme|text_catalogue_snapshot|accessible_catalogue_snapshot|localized_catalogue_snapshot|json_catalogue_snapshot)\s*\(' \
  src/runner/help_tests.rs || true

printf '%s\n' '--- snapshot redaction settings and constants ---'
ast-grep outline src/snapshot_test_support.rs --items all --view expanded || true
rg -n -A36 -B8 \
  '(VERSION|version|filter|help_targets_json_snapshot_settings|diagnostic_json_snapshot_settings|proptest|prop_compose)' \
  src/snapshot_test_support.rs -g '*.rs' || true

printf '%s\n' '--- all snapshot-related property-test definitions ---'
rg -n -A36 -B8 \
  '(proptest!|#[[:space:]]*test|SemVer|Version|version)' \
  src -g '*.rs' || true

printf '%s\n' '--- tracked documentation files that reference redaction or snapshots ---'
git ls-files '*.md' '*.mdx' '*.rst' | while IFS= read -r file; do
  rg -n -i -A10 -B4 \
    '(snapshot|redact|redaction|generator version|help targets|JSON builder|unfiltered text)' \
    "$file" && printf '%s\n' "--- file: $file ---"
done || true

printf '%s\n' '--- tracked snapshot and JSON fixture version values ---'
git ls-files '*.snap' '*.json' '*.txt' | while IFS= read -r file; do
  rg -n -A5 -B5 '"version"[[:space:]]*:[[:space:]]*"(\\[version\\]|[0-9])' \
    "$file" && printf '%s\n' "--- file: $file ---"
done || true

Length of output: 137788


🏁 Script executed:

#!/bin/bash
set -u

printf '%s\n' '--- PR `#611` commit order ---'
gh api "repos/leynos/netsuke/pulls/611/commits?per_page=100" \
  --jq '.[] | [.sha[0:8], .commit.message | split("\n")[0]] | `@tsv`' || true

printf '%s\n' '--- help test symbol locations ---'
rg -n \
  '^(fn (catalogue_snapshot|text_catalogue_snapshot_with_theme|text_catalogue_snapshot|accessible_catalogue_snapshot|localized_catalogue_snapshot|json_catalogue_snapshot)|use .*snapshot_test_support)' \
  src/runner/help_tests.rs || true

printf '%s\n' '--- bounded help test implementation ---'
sed -n '100,240p' src/runner/help_tests.rs || true

printf '%s\n' '--- snapshot support symbol locations ---'
rg -n \
  '^(const |fn |#\[cfg\(test\)\]|mod tests|.*(GENERATOR|generator|VERSION|version|filter|help_targets_json_snapshot_settings|diagnostic_json_snapshot_settings))' \
  src/snapshot_test_support.rs || true

printf '%s\n' '--- bounded snapshot support implementation and tests ---'
sed -n '1,280p' src/snapshot_test_support.rs || true

printf '%s\n' '--- candidate help snapshot paths ---'
git ls-files | rg -i '(help.*target|target.*help|catalogue).*\.(snap|json|txt)$' || true

printf '%s\n' '--- exact version fields in candidate help snapshots ---'
git ls-files | rg -i '(help.*target|target.*help|catalogue).*\.(snap|json|txt)$' \
  | while IFS= read -r file; do
      printf '\n--- %s ---\n' "$file"
      rg -n -A3 -B3 '"version"' "$file" || true
    done

Length of output: 15842


@leynos

Mark the reconciliation complete.

Verify the commit order in PR #611:

  1. 0046af7c — JSON help catalogue version redaction.
  2. e0412438 — text-catalogue snapshot deduplication.
  3. 3598d2c6 — generator-version redaction property coverage.
  4. 05773f33 — redaction documentation.

Verify the current implementation:

  • text_catalogue_snapshot_with_theme removes the reported duplication in src/runner/help_tests.rs.
  • The three text catalogue tests retain their entry points and coverage.
  • json_catalogue_snapshot remains separate. It uses help_targets_json_snapshot_settings() and render_json.
  • add_generator_version_filter owns the shared filter constants.
  • The property test generates SemVer variants, uses the production constants, preserves an unrelated version, and parses the filtered JSON.
  • docs/rstest-bdd-users-guide.md defines the filter ownership, permitted JSON builders, and unfiltered text path.
  • The JSON fixture contains "version": "[version]".

Treat the dynamic validation results as maintainer-provided evidence. This environment performed static inspection only.

You are interacting with an AI system.

Mark the SemVer term as code so the test-module documentation satisfies
Clippy's Markdown convention.
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.

@pandalump

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 28, 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.

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.

Redact version number in JSON catalogue help snapshot

2 participants