Repository navigation
test(app): add learning evaluation seam gate guards - #94
Conversation
Work unit 3 child 5 (learning-promotion): policy-invalid/ambiguous before event reads, empty-tenant rejection before any repository access, and typed invalid-input before storage.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 96b8647b7c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const skills = new RecordingSkills(); | ||
| const events = new RecordingEvents(); |
There was a problem hiding this comment.
Observe every repository read in the tenant guard
If the evaluator is refactored to call skills.get before validating companyId, this test still passes: RecordingSkills.get is not recorded in listCalls, and its underlying fake throws the exact a non-empty companyId is required error expected below. The uninstrumented authority fake creates a similar blind spot, so this does not actually guard the claimed “before any repository read” ordering; use fail-on-access or fully recording repository doubles and assert that every read method remains untouched.
Useful? React with 👍 / 👎.
Linked issue
Closes #89
PR type
type:bug)type:feature)type:docs)type:refactor)type:chore)type:breaking-change)Summary
evaluate-gates.test.ts: typedpolicy-invalid/policy-ambiguousBEFORE any event read; empty-tenant rejection BEFORE any repository access (throws, zero reads); typedinvalid-input(non-positive skill version) BEFORE storage access.pnpm checkexit 0 — 1567 passed | 6 skipped, 0 new warnings.Changes
packages/app/test/learning/evaluate-gates.test.tsVerification
pnpm exec vitest run packages/app/test/learning/evaluate-gates.test.ts→ 3/3pnpm checkGREEN — 1567 passed | 6 skipped, 0 new warningsreview-b7db2c5560bc9a0b(medium, reliability lens) approved with focused+full-gate evidence; pre-pr gateallowContributor checklist
status:approved.type:*label is applied.type/lowercase-description.