Skip to content

claudex: access-matrix acceptance test (#56 W2) - #60

Merged
yogex merged 6 commits into
claudex-harden-w1from
claudex-harden-w2
Dec 3, 2026
Merged

yogex merged 6 commits into
claudex-harden-w1from
claudex-harden-w2

Conversation

@yogex

@yogex yogex commented Dec 3, 2026

Copy link
Copy Markdown
Owner

Issue #56, W2: the access-matrix acceptance test. Stacked on #59 (W1): merge #59 first, then this PR retargets to master.

What changes

  • todo-cal/tests/acceptance/access-matrix/ (a protected path):
    • reads the Payload config's collections at test time;
    • checks each one × 7 operations (list, read, create, update, delete, bulk update and bulk delete with where) × 5 callers (owner, other user, signed out, expired token, locked account) × 2 channels (REST, GraphQL);
    • judges every outcome from database state, not from status codes;
    • checks that a create or update sending another user's id stores the caller's id.
  • expected.json holds the expected outcomes. A collection or operation with no entry fails. Outcome "error" (a server error) passes only when written there explicitly.
  • A new acceptance check in project/claudex.json, and CI prints the matrix totals.

Needs the owner: approve expected.json

It is a draft that records today's behaviour on master. Its decisions list needs your yes/no. The two that matter most:

  • A locked account's existing session keeps full access. Recorded as allow.
  • DELETE /api/payload-preferences/<id> returns HTTP 500 for signed-in callers. Recorded as error.

Local run: 490 combinations, 490 passed, ownership 4/4 (harden-pipeline/evidence/w2-local-enforce.json). CI on this PR is the V5 proof.


Generated by Claude Code

Reads the Payload collections at test time and checks every collection x
operation x caller x channel (REST, GraphQL), judged from database state.
Expected outcomes in expected.json (draft, pending owner approval); a missing
entry fails. Adds the acceptance check and prints matrix totals in CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016efoipS4sWRj5GT8zzaEGZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016efoipS4sWRj5GT8zzaEGZ
…g only

A broken app (V6 without a migration) stopped the matrix's setup, so the
'has an entry' tests never ran. They now need no database.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016efoipS4sWRj5GT8zzaEGZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016efoipS4sWRj5GT8zzaEGZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016efoipS4sWRj5GT8zzaEGZ
@yogex
yogex merged commit baa5032 into claudex-harden-w1 Dec 3, 2026
3 checks passed
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.

2 participants