Skip to content

test(app): add learning evaluation seam gate guards - #94

Merged
riquelmechile merged 1 commit into
mainfrom
feat/learning-app-seam-gates
Aug 21, 2026
Merged

riquelmechile merged 1 commit into
mainfrom
feat/learning-app-seam-gates

Conversation

@riquelmechile

Copy link
Copy Markdown
Owner

Linked issue

Closes #89

PR type

  • Bug fix (type:bug)
  • New feature (type:feature)
  • Documentation only (type:docs)
  • Code refactoring (type:refactor)
  • Maintenance / tooling (type:chore)
  • Breaking change (type:breaking-change)

Summary

  • Work unit 3 child W3C2 (auto-split, stacked-to-main on merged W3C1 feat(app): add read-only learning promotion evaluation seam #93, 158 ≤ 400 lines): gate guards for the evaluation seam (task 2.2 second half) — test-only child, zero production lines.
  • evaluate-gates.test.ts: typed policy-invalid / policy-ambiguous BEFORE any event read; empty-tenant rejection BEFORE any repository access (throws, zero reads); typed invalid-input (non-positive skill version) BEFORE storage access.
  • Full gate pnpm check exit 0 — 1567 passed | 6 skipped, 0 new warnings.

Changes

File or area Change
packages/app/test/learning/evaluate-gates.test.ts Gate-guard tests for the seam (new, 158)

Verification

  • Focused checks pass: pnpm exec vitest run packages/app/test/learning/evaluate-gates.test.ts → 3/3
  • The affected runtime scenario was exercised, or is not applicable (test-only child over the pure seam)
  • Full gate: pnpm check GREEN — 1567 passed | 6 skipped, 0 new warnings
  • Native RDD: lineage review-b7db2c5560bc9a0b (medium, reliability lens) approved with focused+full-gate evidence; pre-pr gate allow

Contributor checklist

  • The linked issue is open and has status:approved.
  • Exactly one PR type is selected and its matching type:* label is applied.
  • The branch name follows type/lowercase-description.
  • Tests and documentation are updated where behavior changed.
  • Commits use Conventional Commit format and contain no attribution trailers.
  • No secrets or unrelated changes are included.

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.
@riquelmechile riquelmechile added the type:feature Feature pull request label Aug 21, 2026
@riquelmechile
riquelmechile merged commit 89a1a14 into main Aug 21, 2026
3 checks passed
@riquelmechile
riquelmechile deleted the feat/learning-app-seam-gates branch August 21, 2026 23:40

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +111 to +112
const skills = new RecordingSkills();
const events = new RecordingEvents();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature Feature pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Wire promotion evaluation app seam, fakes, and atomic verify hook

1 participant