Skip to content

user: the check asks every DECLARED attribute, not presence (closes #618) - #619

Closed
noahgift wants to merge 1 commit into
mainfrom
fix/user-check-asks-declared-attrs
Closed

noahgift wants to merge 1 commit into
mainfrom
fix/user-check-asks-declared-attrs

Conversation

@noahgift

Copy link
Copy Markdown
Contributor

Closes #618. Refs PMAT-618.

The user resource's check was id <name>. So a user with the wrong uid, shell, home, primary group or supplementary groups read as converged, and a changed declaration never re-ran. This matters for the lambda course user: its isolation depends on it NOT being in noah or video.

The check now asserts every declared field against the live account through verdict::assert_that. Fields that aren't declared aren't asserted. For groups, the declared set is compared to the live supplementary set, sorted, deduped, and with the primary group excluded. An extra group diverges, and so does a missing one.

tests_user_check_attrs.rs executes the generated check against a fake id/getent. It has 8 rows. Before the fix, 5 were red. After it, all 8 are green; the user tests are 43 green and the full lib is 13561 passed. Clippy is clean.

🤖 Generated with Claude Code

)

The user resource's check was `id <name>`: a user with the wrong uid, shell,
home, primary group or supplementary groups read as converged, so a changed
declaration (e.g. dropping a group) never re-ran. The check now asserts each
declared field against the live account via forjar's verdict module; the
undeclared ones are not asserted. tests_user_check_attrs executes the check
against a fake id/getent: 5 of 8 rows red before the fix, all green after.

Pmat-Ticket: PMAT-618
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@noahgift

Copy link
Copy Markdown
Contributor Author

folded into #628 (emergency fold, operator 2026-09-24)

@noahgift noahgift closed this Sep 24, 2026
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.

user resource check is presence-only: declared uid/shell/home/group/groups never re-asked; state:absent judged backwards

1 participant