test(sop-checklist): update item count 7→9 (stale test vs grown config) #3196
Reference in New Issue
Block a user
Delete Branch "fix/sop-checklist-test-item-count"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The
Ops Scripts Testslane (advisory /continue-on-error) has been red because.gitea/scripts/tests/test_sop_checklist.pyhardcoded the original 7-item SOP set, but.gitea/sop-checklist-config.yamlgrew to 9 items:scope-matches-declared— added 2026-06-23 after PR #881 slipped runbooks into the public repo under a canvas-test titlepublic-repo-hygiene— public-repo safety checkBoth are real, intentional governance items, so the test was stale, not the config. (Surfaced while reviewing #3193/#3187 — flagged there as pre-existing + unrelated.)
Fix
Updated only the test's hardcoded expectations to the live 9-item config:
test_default_config_parses: len7→9+ the two new slugsrender_statuscounts:7/7→9/9,2/7→2/9,0/7→0/9"8"is now a valid alias → use"10"(aliases run 1..9)test_all_seven_*→test_all_items_*numeric_alias 1..7→1..N (currently 1..9)No production logic changed —
sop-checklist.pyreads the item set from the config dynamically; only the test's stale expectations were wrong.Verification
.gitea/scripts/testssuite: 482 passed, 2 skipped (was 475 passed + 7 failed). YAML valid.🤖 Generated with Claude Code
APPROVED: focused SOP-checklist test/config alignment on
c198360d. The config now has 9 items, so updating the unit expectations from 7/7 to 9/9, moving the unknown numeric shorthand from 8 to 10, and adding the two new slugs to the happy-path/body-unfilled fixtures is correct and non-vacuous. This does not touch runtime behavior or secrets; it fixes stale tests against the grown checklist. I did not treat the known E2E Staging / Ops Scripts / gate-check reds as code blockers per dispatch; CI / all-required and Platform Go are green on this head.APPROVED on
c198360d.5-axis review: this is a test/config-comment-only SOP checklist update, with no production logic touched. The hardcoded expectations now match the live 9-item .gitea/sop-checklist-config.yaml set exactly: comprehensive-testing, local-postgres-e2e, staging-smoke, root-cause, five-axis-review, no-backwards-compat, memory-consulted, scope-matches-declared, public-repo-hygiene. Numeric aliases now run 1..9 and the out-of-range probe moved to 10. Render-status ratios and the end-to-end ack fixtures were updated consistently.
Verification: I loaded the live config via sop-checklist.py and confirmed 9 slugs/aliases, and ran .gitea/scripts/tests/test_sop_checklist.py locally: 48 tests OK. The live Ops Scripts log also shows the full pytest suite passing (
482 passed, 2 skipped) before failing later in the unrelated clone-manifest tolerant-bootstrap step. CI / all-required is green and Gitea reports mergeable=true.