Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: luvs01/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
Replace the assertion-only coverage for the hub-link post-body revalidation with a handler-level regression test in tests/server/context-history-ownership.test.ts. The test builds the same requestPolicyView/resolveApiAuth pair the listener uses, revokes the linked key mid-request, and proves the live-policy closure refuses dispatch while the request-entry snapshot would still admit it.
The revalidation test resolves serve-options.ts via the shared repoPath() helper instead of a test-relative URL, so relocating the test file cannot silently point it at a different tree. Co-Authored-By: Epinephrine <luvs01@hanmail.net>
|
이관됨: lidge-jun#5968 |
|
동일 수정이 상류 저장소에 제출되어 이 포크 PR의 목적은 달성됐습니다. |
Motivation
Description
() => resolveApiAuth(req, ingress === "hub-link" ? linkPolicy() : policy)insrc/server/index/serve-options.tsso hub-link requests consult currentconfig/links instead of the original snapshot.tests/server/link-listener-admission.test.tsthat asserts the code path contains the new revalidation form and that replacingconfig.apiKeyscausesresolveApiAuthto reject the previously-valid linked key.tests/server/context-history-ownership.test.tsthat drives the real post-body revalidation gate with the samerequestPolicyView/resolveApiAuthpair the listener uses: a key revoked mid-request is refused before dispatch, while a closure over the request-entry snapshot would still admit it.structure/runtime.mdto document the in-flight revocation guarantee for thehub-linklistener so the runtime contract reflects the fix.Testing
bun test tests/server/context-history-ownership.test.tsand all 6 tests passed, including the new live-policy revalidation case.bun test tests/server/link-listener-admission.test.tsand all 4 tests passed (Bun 1.4.2).bun run typecheckand it completed successfully.bun run structure:checkand it completed successfully after the doc edit.bun run privacy:scanand it passed.git diff --checkand it reported no problems.Codex Task