Skip to content

verify_slice1_implementation.sh exits before any check runs (set -e with ((x++))) #12135

Closed

Description

@dezren39

Finding

verify_slice1_implementation.sh exits with status 1 right after its header, before any check runs. Its check_passed helper increments the counter with ((success_count++)), and under set -e that arithmetic returns status 1 when the counter is 0. The script therefore cannot report a result. Nothing runs it, so the failure has not surfaced.

Evidence (verified in the current tree)

  • verify_slice1_implementation.sh:2: set -e.
  • verify_slice1_implementation.sh check_passed(): ((success_count++)), and success_count=0 is set earlier.
  • Running bash verify_slice1_implementation.sh prints only the banner and exits with rc=1.
  • Standalone check: bash -c 'set -e; c=0; ((c++)); echo after-increment' exits with rc=1 without printing, so the cause is the arithmetic and not the rest of the script.
  • No caller: git grep finds the script name only in TASK_COMPLETE.txt:89, a document.

Why it matters

The script is advertised as the check that slice 1 meets spec #3026, but it cannot pass or fail on the code. A status file can claim verification that never ran. Both this script and test_slice1_implementation.sh follow the same pattern.

Suggested fix shape

  • Use success_count=$((success_count + 1)), or drop set -e for the counting path, and confirm the script reaches its summary.
  • Either wire it into a real venue (CI or just) with a fixed expectation, or delete it together with the root status reports (see the cleanup issue filed in this pass). Do not leave a verifier that cannot fail.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    on Nov 20, 2026
  2. developing-today commented on Nov 20, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Claim — Lane TX (archer) taking code#12135 now.

    Plan: verify the premise on current main (the ((success_count++)) under set -e in verify_slice1_implementation.sh, and the same pattern in test_slice1_implementation.sh), fix the counting arithmetic so the verifier can actually run to its summary, run it first-hand, and land via PR.

  4. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Lane TX — done record: premise STALE (already fixed on main), closing as completed.

    What was wrong: as filed — verify_slice1_implementation.sh used ((success_count++)) / ((total_checks++)) under set -e, so it exited at the first increment before reporting anything.

    Already fixed on main: commit 8034f4b3934 ("lib: keep remove_iso_files inside the repo root; let slice-1 verify run", 2026-11-21) replaced every ((success_count++)) and ((total_checks++)) in the script with the safe assignment form (success_count=$((success_count + 1)), 16 sites). Verified first-hand: the commit is an ancestor of current origin/main, and no ((...++)) remains in the script. The sibling test_slice1_implementation.sh named in the issue contains no counter arithmetic on current main, so there is nothing to fix there.

    Runtime verification (laptop, worktree at origin/main): ran the verifier with a staged HOME whose mode file reads shadow (the laptop's live mode file reads live, which fails Check 1 by design). Result: Check 1 ✓ (the increment now executes under set -e and the script continues — previously it died at exactly this point), Check 2 begins and its first sub-check passes, then the script exits 1 on a genuine check_failed: ACTIVE_WINDOW_MS not found or incorrect. That is a stale expectation in Check 2 — claimant.py no longer defines that constant — filed separately as #13238. It is not this issue's defect; the proof of this fix is that the verifier now runs and reports real check results.

    No code change was needed from this lane. Closing as completed on the strength of 8034f4b3934 plus the runtime run above.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/testingkind/bugSomething isn't working (prefixed form of the classic bug label)status:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions