Skip to content

fix(checkpoints): the two that never ran, and the scripts nobody tested - #164

Merged
CybotTM merged 1 commit into
mainfrom
fix/checkpoints-that-never-ran
Aug 10, 2026
Merged

fix(checkpoints): the two that never ran, and the scripts nobody tested#164
CybotTM merged 1 commit into
mainfrom
fix/checkpoints-that-never-ran

Conversation

@CybotTM

@CybotTM CybotTM commented Aug 10, 2026

Copy link
Copy Markdown
Member

validate-checkpoints.sh (netresearch/automated-assessment-skill#59) reports GW-15 and GW-16 as rejected by the assessment runner. Neither has ever executed. A rejected checkpoint is skipped silently and the assessment report stays quiet about it, so nothing ever said so.

  • GW-16 is expressible without command substitution: ! git ls-files -- … | grep -q . reaches the same verdict, and the runner strips a leading ! before checking the base command.
  • GW-15 is not. Counting commits since the last tag needs <tag>..HEAD and $( ); the allowlist rejects .. as path traversal and $( as chaining. The checkpoint is removed and the rule moves to verify-git-workflow.sh, where a full shell is available.
  • GW-21 declares # mechanical-counterpart: GW-17. GW-30 declares none (<reason>) — its commands fetch a staging lockfile for a judgement and decide nothing on their own.

A third silent abort in verify-git-workflow.sh

Same family as the two fixed in #163. git rev-parse origin/<branch> echoes the ref name on stdout when it does not resolve, so the non-empty guard passed, the rev-list failed on the literal string, and set -e killed the script three sections early — on every unpushed branch, which is every branch before its first push. The test fixture in #163 had no remote at all, which is why it did not catch this; the new case adds one.

Tests for the three gates that had none

merge-gate.sh — denies BLOCKED, denies UNSTABLE (a red non-required check is still red), denies an unresolved thread even when CLEAN, and passes unrelated gh commands through. Driven with a stubbed gh that answers pr view and api graphql differently; a single canned payload makes every blocking case look like a pass, which is worth knowing before trusting a hook test.

conflict-marker-gate.py — denies staged conflict markers, passes non-commit commands, fails open outside a repository.

spec-cleanup-guard.sh — reports artifacts and, per its stated invariant, modifies and stages nothing.

Keeping it fixed

test_checkpoint_patterns.sh asserts every type: command pattern is actually runnable: single line, no chaining metacharacters, no .., base command on the allowlist. The rule is mirrored rather than imported — automated-assessment is not a dependency of this repo, and a test that needs an absent checkout is a test that does not run. Every fix above was verified by re-injecting the defect and watching the specific assertion fail.

tests.yml becomes a thin caller of the reusable from netresearch/skill-repo-skill#211.

The new validate-checkpoints.sh reports GW-15 and GW-16 as rejected by
the assessment runner. Neither has ever executed, and nothing said so —
a rejected checkpoint is skipped silently and the report stays quiet.

GW-16 is expressible without command substitution: `! git ls-files -- …
| grep -q .` reaches the same verdict, and the runner strips a leading
`!` before checking the base command.

GW-15 is not. Counting commits since the last tag needs `<tag>..HEAD` and
`$( )`, and the allowlist rejects `..` as path traversal and `$(` as
chaining. The checkpoint is removed and the rule moves to
verify-git-workflow.sh, where a full shell is available.

GW-21 declares `# mechanical-counterpart: GW-17`; GW-30 declares
`none (<reason>)` — its commands fetch a staging lockfile for a judgement
and decide nothing on their own.

A third abort in verify-git-workflow.sh, same family as the two fixed in
#163: `git rev-parse origin/<branch>` echoes the ref NAME on stdout when
it does not resolve, so the non-empty guard passed, the rev-list failed
on the literal string, and `set -e` killed the script three sections
early — on every unpushed branch, which is every branch before its first
push.

Tests for the three shipped gates that had none: merge-gate.sh (denies
BLOCKED, denies UNSTABLE, denies an unresolved thread even when CLEAN,
passes unrelated commands), conflict-marker-gate.py (denies staged
markers, fails open outside a repo), spec-cleanup-guard.sh (reports
artifacts and — its stated invariant — modifies nothing).

test_checkpoint_patterns.sh asserts every `type: command` pattern is
runnable: single line, no chaining metacharacters, no `..`, base command
on the allowlist. The rule is mirrored rather than imported, because
automated-assessment is not a dependency of this repo and a test that
needs an absent checkout does not run.

tests.yml is now a thin caller of the skill-repo-skill reusable.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
Copilot AI lite review requested due to automatic review settings August 10, 2026 15:11
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 1 package(s) with unknown licenses.
See the Details below.

License Issues

.github/workflows/tests.yml

PackageVersionLicenseIssue Type
netresearch/skill-repo-skill/.github/workflows/tests.ymlmainNullUnknown License

OpenSSF Scorecard

PackageVersionScoreDetails
actions/netresearch/skill-repo-skill/.github/workflows/tests.yml main 🟢 6.9
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 17 issue activity found in the last 90 days -- score normalized to 10
Code-Review⚠️ 0Found 0/11 approved changesets -- score normalized to 0
Packaging⚠️ -1packaging workflow not detected
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Dependency-Update-Tool🟢 10update tool detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies🟢 7dependency not pinned by hash detected -- score normalized to 7
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Vulnerabilities🟢 100 existing vulnerabilities detected
SAST🟢 10SAST tool is run on all commits
Fuzzing⚠️ 0project is not fuzzed
License🟢 9license file detected
Signed-Releases🟢 85 out of the last 5 releases have a total of 5 signed artifacts.
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
Security-Policy🟢 10security policy file detected
Contributors🟢 10project has 3 contributing companies or organizations -- score normalized to 10
CI-Tests🟢 1012 out of 12 merged PRs checked by a CI test -- score normalized to 10

Scanned Files

  • .github/workflows/tests.yml

@CybotTM
CybotTM merged commit 95d0574 into main Aug 10, 2026
23 of 24 checks passed
@CybotTM
CybotTM deleted the fix/checkpoints-that-never-ran branch August 10, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants