Repository navigation
test(stories): cover the scoped sudoers.d cluster (151-153) - #615
vladimirrott merged 2 commits into
Conversation
Add Ubuntu stories for the three scoped sudoers.d actions, one per action: - 151 GetSudoGrants (read-only, Low) — near miss GrantSudoAccess - 152 GrantSudoAccess (High) — near miss RevokeSudoAccess - 153 RevokeSudoAccess (High) — near miss GrantSudoAccess Each asserts a single step, the expected action and risk, the key params, and that the reciprocal near-miss action is absent. Update the figures the story-coverage guard derives from the tree: the suite is now 153 stories (54 atomic + 99 Ubuntu), and three more cross-family actions are covered, so the "still untouched by any story" count drops from 49 to 46. These live in CONTRIBUTING.md, docs/introduction.md, docs/testing/user-stories.md and HACKING.md. Cassettes are intentionally not recorded here; the maintainer records the live runs.
vladimirrott
left a comment
There was a problem hiding this comment.
Thanks, @bferanmi806-sketch. Three more from the #233 map, in the house style of your #516 and #574, and the numbers in all four docs check out.
Reviewed at 75297f5. What I checked:
- All three actions are in
KNOWN_ACTION_NAMES, and the asserted risks match the specs:GetSudoGrantslow (sudoers.rs:46),GrantSudoAccessandRevokeSudoAccesshigh (sudoers.rs:84,:95). The.riskin--jsoncomes from the catalogue, so those assertions are deterministic once the action is right. commandsis a string in the executor (require_str,executor.rs:1313), so comparing.params.commandsto/usr/bin/systemctlis the right shape.- Recount on the merged tree: 153 stories = 54 atomic + 99 ubuntu, 49 → 46 untouched cross-family actions. The public-claims gate goes red when a story header flips family, which is the merge receipt.
bash -nand shellcheck are clean. The stories use--dry-run, so no sudoers drop-in is ever written on the VM.
One nit, optional: story-152.sh assigns USER=..., which shadows the exported $USER. It's harmless here; GRANT_USER would read cleaner.
I'll merge once the board is green, then put a recount banner on #233 (sudoers cluster done, next free id 154). #219 and #482 are still yours. If either has stalled, tell me and I'll free it with no hard feelings.
Resolves the one conflict in docs/testing/user-stories.md: lacs-project#609 rewrote the Ubuntu story sentence to carry the live-VM figure, and this branch moved the count to 99. The result keeps both: "a further 99 (79 of them in the recorded live-VM runs)". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UpyrhbDTW1gBwzGAC44GYU
|
Main moved under this after #609 landed, and both PRs edited the same sentence in |
vladimirrott
left a comment
There was a problem hiding this comment.
Re-approving at bc292b5 after the merge from main. The three stories are unchanged from the head I reviewed, and the only conflict edit is the one sentence described above.
Summary
Adds three Ubuntu E2E stories covering the scoped sudoers.d cluster from the
#233 coverage map, one story per action:
GetSudoGrantsGrantSudoAccessGrantSudoAccessRevokeSudoAccessRevokeSudoAccessGrantSudoAccessEach story asserts a single step, the expected action and risk, the key params
(
name/user/commands), and that the reciprocal near-miss action isabsent — so 151 (list) cannot plan a grant, 152 cannot plan a revoke, and 153
cannot plan a grant. The grant intent stays password-protected;
nopasswdisdeliberately not requested because the daemon refuses a passwordless grant for a
command that can spawn other programs.
Because the story-coverage guard derives its figures from the tree, the coupled
counts are updated in the same commit: the suite is now 153 stories
(54 atomic + 99 Ubuntu), and the "action names still untouched by any story"
count drops 49 → 46 (the three actions above are cross-family). Updated in
CONTRIBUTING.md,docs/introduction.md,docs/testing/user-stories.mdandHACKING.md.Related Issue
Part of #233 (the clustered story-coverage map). This does not close #233 —
it covers only the scoped sudoers.d cluster.
Validation
Host-side checks run locally:
shellcheck tests/e2e/stories/story-151.sh story-152.sh story-153.sh— cleanbash -non all three stories — cleantests/e2e/story-metadata.test.sh—Story metadata derived cleanly: 153 stories (99 ubuntu, 54 atomic).scripts/check_evidence_claims.py .—Published figures match the evidence artifacts.The stories themselves require a live VM + LLM (they call
sysknife --dry-run --json), so they are not executed here.Notes for Reviewers
the stories first, with live recording done by a maintainer, keeps the PR small
and reviewable.
scripts/check_evidence_claims.pyrefuses the PR if the derived family sizes and uncovered-action counts are not
updated to match the new stories.
docs/testing/user-stories.md,HACKING.md) were corrected to 99 alongside the guard-mandated edits, sincethey describe the same family this PR extends.