Skip to content

feat(issue-261): build workspace stale-test audit lane#262

Merged
graysurf merged 1 commit intomainfrom
issue/s1-t1-build-workspace-stale-test-scanner-and-normalize
Feb 26, 2026
Merged

feat(issue-261): build workspace stale-test audit lane#262
graysurf merged 1 commit intomainfrom
issue/s1-t1-build-workspace-stale-test-scanner-and-normalize

Conversation

@graysurf
Copy link
Owner

Summary

  • Implements Sprint 1 lane tasks S1T1-S1T4 for issue Plan: Workspace obsolete test cleanup and de-risking #261 by adding a deterministic workspace stale-test audit workflow.
  • Adds normalized stale-test inventory output plus helper callgraph/orphan analysis, contract protection allowlist, tier assignments, and execution manifest artifacts under $AGENT_HOME/out/workspace-test-cleanup.

Scope

  • Added scripts/dev/workspace-test-stale-audit.sh with deterministic full-workspace scanning and normalized schema output (id, crate, path, symbol_or_test, signal, proposed_action, confidence).
  • Implemented Task 1.2 outputs: helper-callgraph.tsv and helper-orphans.tsv with deterministic IDs and manual-review flags for macro/reflection edge patterns.
  • Implemented Task 1.3 outputs: decision-rubric.md and contract-allowlist.tsv with explicit remove|keep|rewrite|defer rules and contract/parity/json/exit-code protections.
  • Implemented Task 1.4 outputs: crate-tiers.tsv (candidate-tier-task assignment) and execution-manifest.md (serialized high-overlap crates + lane gating).
  • Excluded: Sprint 2+ code cleanup tasks (helper deletion/refactors) and any non-lane runtime behavior changes.

Testing

  • bash -n scripts/dev/workspace-test-stale-audit.sh (pass)
  • mkdir -p "$AGENT_HOME/out/workspace-test-cleanup" (pass)
  • bash scripts/dev/workspace-test-stale-audit.sh --format tsv --out "$AGENT_HOME/out/workspace-test-cleanup/stale-tests.tsv" (pass)
  • cp "$AGENT_HOME/out/workspace-test-cleanup/stale-tests.tsv" "$AGENT_HOME/out/workspace-test-cleanup/stale-tests.r1.tsv" (pass)
  • bash scripts/dev/workspace-test-stale-audit.sh --format tsv --out "$AGENT_HOME/out/workspace-test-cleanup/stale-tests.r2.tsv" (pass)
  • diff -u "$AGENT_HOME/out/workspace-test-cleanup/stale-tests.r1.tsv" "$AGENT_HOME/out/workspace-test-cleanup/stale-tests.r2.tsv" (pass)
  • test -s "$AGENT_HOME/out/workspace-test-cleanup/helper-callgraph.tsv" (pass)
  • test -s "$AGENT_HOME/out/workspace-test-cleanup/helper-orphans.tsv" (pass)
  • awk -F '\t' 'NR>1 && $4=="0" {print $1}' "$AGENT_HOME/out/workspace-test-cleanup/helper-callgraph.tsv" | sort > "$AGENT_HOME/out/workspace-test-cleanup/orphans-from-callgraph.ids" (pass)
  • awk -F '\t' 'NR>1 {print $1}' "$AGENT_HOME/out/workspace-test-cleanup/helper-orphans.tsv" | sort > "$AGENT_HOME/out/workspace-test-cleanup/orphans-reported.ids" (pass)
  • diff -u "$AGENT_HOME/out/workspace-test-cleanup/orphans-from-callgraph.ids" "$AGENT_HOME/out/workspace-test-cleanup/orphans-reported.ids" (pass)
  • test -s "$AGENT_HOME/out/workspace-test-cleanup/decision-rubric.md" (pass)
  • test -s "$AGENT_HOME/out/workspace-test-cleanup/contract-allowlist.tsv" (pass)
  • rg -n 'remove|keep|rewrite|defer|contract|parity|exit code|json' "$AGENT_HOME/out/workspace-test-cleanup/decision-rubric.md" (pass)
  • test -s "$AGENT_HOME/out/workspace-test-cleanup/execution-manifest.md" (pass)
  • test -s "$AGENT_HOME/out/workspace-test-cleanup/crate-tiers.tsv" (pass)
  • awk -F '\t' 'NR>1 && ($2=="" || $3=="" || $4=="") {print $0}' "$AGENT_HOME/out/workspace-test-cleanup/crate-tiers.tsv" | wc -l | tr -d ' ' | rg '^0$' (pass)
  • plan-tooling validate --file /Users/terry/Project/graysurf/nils-cli/docs/plans/workspace-obsolete-tests-cleanup-plan.md (pass)
  • ./.agents/skills/nils-cli-verify-required-checks/scripts/nils-cli-verify-required-checks.sh (pass)
  • cargo llvm-cov nextest --profile ci --workspace --lcov --output-path target/coverage/lcov.info --fail-under-lines 85 (fail: transient SIGKILL during test listing)
  • CARGO_BUILD_JOBS=4 NEXTEST_TEST_THREADS=1 cargo llvm-cov nextest --profile ci --workspace --lcov --output-path target/coverage/lcov.info --fail-under-lines 85 (pass)
  • scripts/ci/coverage-summary.sh target/coverage/lcov.info (pass; Total line coverage 86.47%)

Issue

@github-actions
Copy link

Coverage

Total line coverage: 86.44% (58946/68195 lines hit).

@graysurf graysurf marked this pull request as ready for review February 26, 2026 01:10
@graysurf graysurf merged commit 93cca1f into main Feb 26, 2026
6 checks passed
@graysurf graysurf deleted the issue/s1-t1-build-workspace-stale-test-scanner-and-normalize branch February 26, 2026 01:11
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