Skip to content

test: land semantic-edge regression suites (test/shift/arith) - #927

Merged
caomengxuan666 merged 1 commit into
masterfrom
fix/semantic-edges
Oct 20, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
fix/semantic-edges

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

26 probes, all bash-measured: test_tests +12 (octal/empty/overflow/-t/unary/parens/precedence/arity), new shift_count_edge (7: OOB/silent/negative/nonnumeric/--/isolation), new arith_cache_fallback (7: RANDOM/assoc-concat/nounset/literal-keys/octal). lib 651 + 14 integration green. WSL 5.3.0 re-verify deferred to main.

GNU ownership: test.c posixtest/two_arguments/three_arguments/expr
(valid_number general.c:248-281; -t test.c:499-535), builtins/shift.def
+ builtins/common.c get_numeric_arg/no_args, arithmetic expansion
subst.c: parameter/assoc subscript literal keys.

No impl change; pins only, all byte-verified against bash 5.3.20
(WSL 5.3.0 re-check by main session):
- src/builtins/test_tests.rs: T1 010-decimal, T2 0x->2/08-ok,
  T3 empty->2, T4 overflow->2, T5 -t x4, T6 single-arg string,
  T7 !-negation, T8 paren traps, T9 -a>-o, T10 combo, arity 0..6,
  -t/-v complement (12 tests)
- tests/shift_count_edge_regressions.rs: S1..S7 (7 tests)
- tests/arith_cache_fallback_regressions.rs: A1..A7, set -u last (7 tests)

lib 651 green; new integration 14/14 green; cargo fmt clean.
@caomengxuan666
caomengxuan666 merged commit eeeba4d into master Oct 20, 2026
8 checks passed
@caomengxuan666

Copy link
Copy Markdown
Member Author

Post-merge review (merge base a53aeaaa, merged as eeeba4d3). Reviewed on Windows local against the merge base and the merge commit.

What checks out

  • Scope: no production code. src/builtins/test_tests.rs is #[cfg(test)]-gated (wired via #[path] in src/builtins/test.rs), so the substance is test-only; the two tests/*.rs files are new suites.
  • Independence: every test spawns a fresh rubash -c process; no shared state, no ordering assumptions. The full cli_tests target on the head tree shows the identical 22-name pre-existing local-env failure set as the base (no new red).
  • The fast-loop differential in perf(for-arith): counter fast driver for canonical counting loops #925's contract tests and the test builtin units all pass on the head tree.

Finding: no discriminating power against master

The review bar requires at least one "red on master, green on branch" proof. All three additions were run against the merge base (a53aeaaa sources + this PR's test files):

  • tests/shift_count_edge_regressions.rs: 7/7 pass on base (s1-s7).
  • tests/arith_cache_fallback_regressions.rs: 7/7 pass on base (a1-a7).
  • src/builtins/test_tests.rs additions (T1-T10, arity_matrix_zero_through_six, dash_t_dash_v_complement): 27/27 of the builtins::test::tests module pass on base, same as head.

Nothing in this PR fails on its own merge base, so it cannot demonstrate it would catch any regression — it is a characterization suite throughout. Same request as for #926: if any case was expected to be red on some earlier revision, note which; otherwise mark the intent as characterization.

Side note for triage (pre-existing on master, unrelated to this PR but it blocks local runs): cargo test --lib does not compile on Windows at both a53aeaaa and eeeba4d3 — the #[cfg(windows)] tests in src/builtins/cd.rs (~:476, :503) pass a HashMap to execute_with_io, which now takes &mut VarTable. CI runs lib tests on Linux, so cfg(windows) blocks are never compiled there; the #925 contract tests in compound_exec.rs are similarly unrunnable on Windows hosts until this is fixed.

Verdict: content safe (test-only, no new red), but the required discrimination proof is absent.

@caomengxuan666
caomengxuan666 deleted the fix/semantic-edges branch October 21, 2026 08:04
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