Skip to content

Regression coverage for conditional action dependency manifests (3.14.5) - #387

Draft
leynos wants to merge 23 commits into
mainfrom
3-14-5-regression-coverage-for-conditional-action-dependency-manifests
Draft

Regression coverage for conditional action dependency manifests (3.14.5)#387
leynos wants to merge 23 commits into
mainfrom
3-14-5-regression-coverage-for-conditional-action-dependency-manifests

Conversation

@leynos

@leynos leynos commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

Adds regression coverage for roadmap item 3.14.5 — conditional action
dependency manifests
. The change is test-and-documentation only; production
behaviour is unchanged.

The suite now proves:

  1. Action-level when and foreach work together.
  2. Real command_available(...) resolution selects exactly one nextest or
    legacy action in deterministic present and absent tool worlds.
  3. Absent-command fallback performs no impure stdlib operation during
    selection, with a shell-in-when control proving the observable is live.
  4. A conditionally selected action's deps lower to IR implicit_deps and
    Ninja | inputs, including {{ item }} substitution and || order-only
    dependencies.

Coverage spans confined in-crate googletest/rstest cases, IR integration tests,
an Insta snapshot validated with real Ninja, and one combined BDD scenario.
The users' guide, developers' guide, design document, roadmap, and living
ExecPlan have been updated.

Validation

  • make fmt
  • make markdownlint
  • make nixie
  • make check-fmt
  • make typecheck
  • make lint
  • INSTA_UPDATE=no make test
  • coderabbit review --agent after every major milestone and for the final
    branch diff: zero actionable findings

Each new regression layer also passed a targeted sabotage check that produced
the expected assertion-level failure before the production line was restored.

References

Summary by Sourcery

Add comprehensive regression coverage and documentation for conditional action dependency manifests without changing production behaviour.

Enhancements:

  • Add deterministic regression coverage for conditional action selection, including action-level when/foreach, real command-availability resolution, and selection-time purity.
  • Verify that dependencies on conditionally selected actions and targets retain their distinct IR and Ninja dependency classes, including item substitution and order-only dependencies.

Build:

  • Update the lockfile for the added development testing dependencies.

Documentation:

  • Document conditional action dependencies and deterministic testing conventions, clarify the manifest/stdlib boundary, and mark roadmap item 3.14.5 complete.

Tests:

  • Add in-crate resolver and impurity-boundary tests, IR assertions, a Ninja snapshot with real-Ninja validation, and a combined BDD scenario.

Chores:

  • Apply repository-wide formatting and related test expectation updates required by the current template/rendering behaviour.

@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

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 3-14-5-regression-coverage-for-conditional-action-dependency-manifests

Warning

Your free Security trial is over. An organization admin can activate Security or dismiss this notice.


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

@leynos leynos changed the title Draft execplan: regression coverage for conditional action dependency manifests (3.14.5) Plan: Regression coverage for conditional action dependency manifests (3.14.5) Jun 19, 2026
@lodyai
lodyai Bot force-pushed the 3-14-5-regression-coverage-for-conditional-action-dependency-manifests branch from f4e21b1 to d591a6d Compare July 28, 2026 21:57
codescene-access[bot]

This comment was marked as outdated.

@lodyai lodyai Bot changed the title Plan: Regression coverage for conditional action dependency manifests (3.14.5) Regression coverage for conditional action dependency manifests (3.14.5) Jul 28, 2026
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.

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.

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.

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.

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.

codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

@leynos
leynos force-pushed the 3-14-5-regression-coverage-for-conditional-action-dependency-manifests branch from 87a0993 to cbad3ac Compare August 14, 2026 21:59
codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

@leynos
leynos force-pushed the 3-14-5-regression-coverage-for-conditional-action-dependency-manifests branch from cbad3ac to a857fde Compare August 16, 2026 22:25
codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

leynos and others added 22 commits August 29, 2026 13:47
….14.5)

Draft an execution plan for roadmap item 3.14.5: regression coverage for
conditional action dependency manifests. The implementation (3.14.2-3.14.4)
already exists, so the plan scopes test and documentation work only.

The plan was developed with a planning agent team, reviewed and revised by a
community-of-experts agent team (structural, contract/correctness,
alternatives/DX, and reliability/ops lenses), and cross-checked against the
codebase. It covers all four roadmap sub-bullets, frames the work through the
manifest-time-expansion boundary (executable-discovery vs command-execution
ports), and records open questions for the approver.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Update the rebased plan for the current `rstest` version and remove the
upstream-resolved backup-module question. Apply repository Markdown formatting
and Oxford spelling so the plan passes the current documentation gates.
Add the approved googletest and pretty-assertions development dependencies.
Record the successful googletest/rstest interoperability spike and the
confirmed test seams in the living execution plan before implementation.
Exercise the real command resolver with deterministic present and absent
tool worlds. Verify complementary branches retain exactly one action and
that action-level foreach expansion removes its control fields.

Record the focused sabotage evidence and implementation findings in the
living ExecPlan.
Assert that absent-tool fallback selection leaves the shared impurity
marker clear. Pair it with a cross-platform shell-in-when control that
proves the boundary observable is live during expansion.

Record the focused sabotage evidence and findings in the ExecPlan.
Add a deterministic fixture combining complementary selection, action
foreach expansion, and all three dependency classes. Verify selected
actions and targets lower dependencies into the correct IR fields while
filtered branches contribute no paths.

Document direct-path isolation and the focused sabotage evidence.
Pin Ninja emission for selected foreach actions and the selected target,
including explicit, implicit, and order-only dependency syntax. Validate
the generated file with real Ninja queries, a harmless build, and a
deterministic no-op second pass.

Record snapshot and sabotage evidence in the ExecPlan.
Add one combined BDD scenario proving a selected foreach action retains
its explicit and implicit dependencies through Ninja generation. Reuse
the existing IR and Ninja steps to avoid expanding the matcher surface.

Mark Stage B complete and record the behavioural sabotage evidence.
Explain complementary action selection and implicit dependency behaviour
for users. Record deterministic resolver tests, assertion conventions,
and the existing discovery-versus-execution boundary for maintainers.

Mark roadmap item 3.14.5 complete and record why no ADR is required.
Mark Stage C complete after its full gate stack and CodeRabbit review
passed, leaving only final branch-wide validation and publication.
Record the final branch-wide gate results, clean CodeRabbit review, and
completed roadmap status after all implementation milestones passed.
Rebuild `Cargo.lock` from the rebased manifests and preserve the existing
time-offset contract against the updated dependency set.

Update affected rendered-boolean assertions and apply the current Rust lint
policy, including capability-scoped fixture filesystem access, so the rebased
branch remains fully validated.
Retain the current development dependency declarations, regenerate
`Cargo.lock`, and make the resulting test diagnostics compatible with the
current lint rules.
Cover the minimal and duplicate-rule fixtures through one shared test so
their expected graph cardinalities remain explicit and consistent.
Regenerate `Cargo.lock` from the merged manifest and keep the refreshed
toolchain's diagnostic assertions lint-clean.
Keep the real-Ninja regression workflow intact while isolating workspace,
command, selection, timestamp, and no-op responsibilities.
Regenerate `Cargo.lock` from the merged manifest and retain `main`'s
Unix-only policy for native Ninja execution while preserving the
conditional dependency regression coverage.
Use the path display representation in the upstream ladder assertion so
the target's strict Clippy configuration accepts the rebased test suite.
Preserve the existing UTF-8 conversion context while rendering invalid
temporary paths with their display representation for strict Clippy.
Regenerate `Cargo.lock` from the merged manifest and update the upstream
runner test diagnostic for the target branch's strict Clippy policy.
Format non-UTF-8 temporary paths through `Display` and compile the
executable-permission helper only where the test needs it.
Rebuild the dependency lockfile from the main-side manifest after the
rebase so it records the current compatible resolver output.
@leynos
leynos force-pushed the 3-14-5-regression-coverage-for-conditional-action-dependency-manifests branch from 96fbbf8 to 63ddd89 Compare August 29, 2026 11:55
codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

@leynos

leynos commented Aug 29, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai Please investigate the cause of the following issue using codegraph exploration and research, identify a fix and provide an AI coding agent prompt for the fix:

        FAIL [   0.227s] (2042/2269) netsuke-build::stdlib_which_pathext_tests normalized_pathext_governs_resolution
  stdout ───

    running 1 test
    test normalized_pathext_governs_resolution ... FAILED

    failures:

    failures:
        normalized_pathext_governs_resolution

    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 3 filtered out; finished in 0.11s
    
  stderr ───
    Error: expected command_available('scripted') to be false, got False

    Stack backtrace:
       0: std::backtrace_rs::backtrace::win64::trace
                 at /rustc/c54751567b19c4ceb08b0412d83529c2568cba8b/library\std\src\..\..\backtrace\src\backtrace\win64.rs:85
       1: std::backtrace_rs::backtrace::trace_unsynchronized
                 at /rustc/c54751567b19c4ceb08b0412d83529c2568cba8b/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
       2: std::backtrace::Backtrace::create
                 at /rustc/c54751567b19c4ceb08b0412d83529c2568cba8b/library\std\src\backtrace.rs:331
       3: std::backtrace::Backtrace::capture
                 at /rustc/c54751567b19c4ceb08b0412d83529c2568cba8b/library\std\src\backtrace.rs:296
       4: <anyhow::Error>::msg::<alloc::string::String>
       5: stdlib_which_pathext_tests::main
       6: std::rt::lang_start::<()>
       7: stdlib_which_pathext_tests::main
       8: stdlib_which_pathext_tests::main
       9: std::rt::lang_start::<()>
      10: stdlib_which_pathext_tests::main
      11: core::ops::function::FnOnce::call_once
                 at /rustc/c54751567b19c4ceb08b0412d83529c2568cba8b/library\core\src\ops\function.rs:250
      12: test::__rust_begin_short_backtrace<enum2$<core::result::Result<tuple$<>,alloc::string::String> >,enum2$<core::result::Result<tuple$<>,alloc::string::String> > (*)()>
                 at /rustc/c54751567b19c4ceb08b0412d83529c2568cba8b/library\test\src\lib.rs:733
      13: test::run_test_in_process
                 at /rustc/c54751567b19c4ceb08b0412d83529c2568cba8b/library\test\src\lib.rs:756
      14: test::run_test::closure$0
                 at /rustc/c54751567b19c4ceb08b0412d83529c2568cba8b/library\test\src\lib.rs:677
      15: test::run_test::closure$1
                 at /rustc/c54751567b19c4ceb08b0412d83529c2568cba8b/library\test\src\lib.rs:707
      16: std::sys::backtrace::__rust_begin_short_backtrace<test::run_test::closure_env$1,tuple$<> >
                 at /rustc/c54751567b19c4ceb08b0412d83529c2568cba8b/library\std\src\sys\backtrace.rs:166
      17: std::thread::lifecycle::spawn_unchecked::closure$1::closure$0
                 at /rustc/c54751567b19c4ceb08b0412d83529c2568cba8b/library\std\src\thread\lifecycle.rs:70
      18: core::panic::unwind_safe::impl$25::call_once
                 at /rustc/c54751567b19c4ceb08b0412d83529c2568cba8b/library\core\src\panic\unwind_safe.rs:275
      19: std::panicking::catch_unwind::do_call
                 at /rustc/c54751567b19c4ceb08b0412d83529c2568cba8b/library\std\src\panicking.rs:574
      20: std::panicking::catch_unwind
                 at /rustc/c54751567b19c4ceb08b0412d83529c2568cba8b/library\std\src\panicking.rs:542
      21: std::panic::catch_unwind
                 at /rustc/c54751567b19c4ceb08b0412d83529c2568cba8b/library\std\src\panic.rs:359
      22: std::thread::lifecycle::spawn_unchecked::closure$1
                 at /rustc/c54751567b19c4ceb08b0412d83529c2568cba8b/library\std\src\thread\lifecycle.rs:68
      23: core::ops::function::FnOnce::call_once<std::thread::lifecycle::spawn_unchecked::closure_env$1<test::run_test::closure_env$1,tuple$<> >,tuple$<> >
                 at /rustc/c54751567b19c4ceb08b0412d83529c2568cba8b/library\core\src\ops\function.rs:250
      24: std::sys::thread::windows::impl$0::new::thread_start
                 at /rustc/c54751567b19c4ceb08b0412d83529c2568cba8b/library\std\src\sys\thread\windows.rs:58
      25: BaseThreadInitThunk
      26: RtlUserThreadStart

  Cancelling due to test failure: 3 tests still running
        PASS [   0.370s] (2043/2269) netsuke-build::stdlib_which_tests command_available_all_kwarg_does_not_affect_bool::case_2_present_all
        SLOW [> 60.000s] (─────────) netsuke-build::packaging_smoke_tests packaged_manifest_retains_build_script_sources
        SLOW [>120.000s] (─────────) netsuke-build::locale_stub_ui_tests harness_compiles_under_a_split_build_dir
        SLOW [>120.000s] (─────────) netsuke-build::packaging_smoke_tests packaged_manifest_retains_build_script_sources
        SLOW [>180.000s] (─────────) netsuke-build::locale_stub_ui_tests harness_compiles_under_a_split_build_dir
        PASS [ 190.926s] (2044/2269) netsuke-build::locale_stub_ui_tests harness_compiles_under_a_split_build_dir
  stdout ───

    running 1 test
    test harness_compiles_under_a_split_build_dir has been running for over 60 seconds
    2026-08-29T12:22:29.839579Z  INFO locale_stub_ui_tests: cargo build test_support completed elapsed_seconds=187.9576708
    2026-08-29T12:22:30.215711Z  INFO locale_stub_ui_tests: rustc metadata harness completed elapsed_seconds=0.2944937
    test harness_compiles_under_a_split_build_dir ... ok

    test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 28 filtered out; finished in 190.90s
    

        PASS [ 152.634s] (2045/2269) netsuke-build::packaging_smoke_tests packaged_manifest_retains_build_script_sources
  stdout ───

    running 1 test
    test packaged_manifest_retains_build_script_sources has been running for over 60 seconds
    2026-08-29T12:22:41.574154Z  INFO packaging_smoke_tests: cargo publish --dry-run completed elapsed_seconds=151.5537833
    2026-08-29T12:22:41.773811Z  INFO packaging_smoke_tests: cargo package --list completed elapsed_seconds=0.1995446
    test packaged_manifest_retains_build_script_sources ... ok

    test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out; finished in 152.61s
    

────────────
     Summary [ 290.103s] 2045/2269 tests run: 2044 passed (3 slow), 1 failed, 2 skipped
        FAIL [   0.227s] (2042/2269) netsuke-build::stdlib_which_pathext_tests normalized_pathext_governs_resolution
warning: 224/2269 tests were not run due to test failure (run with --no-fail-fast to run all tests, or run with --max-fail)
error: test run failed
make: *** [Makefile:101: test-nextest] Error 100

https://github.com/leynos/netsuke/actions/runs/33251236690/job/99097151318?pr=387

@coderabbitai

This comment was marked as resolved.

Expect MiniJinja's rendered Boolean spelling while retaining the assertion
that the excluded command is unavailable.
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant