Repository navigation
refactor(sdk): simplify publication preparation - #1211
Conversation
Repository fixtures and hydration tools duplicate Git process setup. Share the existing invocation patterns with their actual consumers.
SDK entrypoints and tests repeat runtime, authentication and option setup. Share the setup at existing owners and introduce internal helpers with their first consumers.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The refactors preserve existing behavior and maintain comprehensive publication coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Simplifies publication preparation and receipt tests by reusing shared helpers while preserving publication behavior.
Changes:
- Consolidates finding mapping, claim resolution, hashing, and workbench runtime setup.
- Reuses publication fixtures, mocks, JSONL utilities, and cancellation helpers.
- Retains ordering, recovery, cancellation, and receipt assertions.
| File | Description |
|---|---|
sdk/typescript/src/cloud-publish.ts |
Reuses shared SHA-256 helper. |
sdk/typescript/src/publication-events.ts |
Simplifies claim normalization and conflict detection. |
sdk/typescript/src/publication-store.ts |
Reuses finding and workbench runtime helpers. |
sdk/typescript/src/publication.ts |
Simplifies publication issue preparation and evidence rendering. |
sdk/typescript/src/publish.ts |
Consolidates finding maps, prompt construction, and handoff records. |
sdk/typescript/tests-ts/cloud-publish.test.ts |
Reuses fixtures and mock helpers. |
sdk/typescript/tests-ts/custom-publish.test.ts |
Simplifies fixture and request assertions. |
sdk/typescript/tests-ts/finding-workflow-publication.test.ts |
Reuses reviewer, error, and mock helpers. |
sdk/typescript/tests-ts/publication-check.test.ts |
Reuses cancellation and failure fixtures. |
sdk/typescript/tests-ts/publication-integration.test.ts |
Consolidates integration fixtures and JSONL handling. |
sdk/typescript/tests-ts/publication-store.test.ts |
Simplifies fixture copying and cancellation synchronization. |
sdk/typescript/tests-ts/publication.test.ts |
Reuses completed-scan and temporary-directory fixtures. |
sdk/typescript/tests-ts/publish.test.ts |
Consolidates publication mocks, receipts, and JSONL assertions. |
sdk/typescript/tests-ts/support/workbench-fakes.ts |
Adds a reusable canceled-inspection fixture. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Persisted finding workflows and recovery tests repeat owner calls and data preparation. Consolidate those paths while retaining current recovery and validation behavior.
Publication preparation and receipt handling repeat transformations and fixture setup. Reuse the finding and workbench owners and consolidate equivalent publication operations.
alandelong-oai
left a comment
There was a problem hiding this comment.
Reviewed 5f9dfd46f3429a6a5dbe18be64dce623c0517e3f against its own base a8a76bab5dc1b0d76b80b9d10d780128b0f5da2e with exactly three independent high-reasoning full-diff reviews, including every test diff, plus root verification. No serious introduced code defect identified.
188 distinct focused SDK tests passed across the initial run and one targeted permission control. The initial run had 187 passes and a sandbox-denied read-only ps check; that unchanged test passed with permission. Fresh native host build, plugin/SDK builds, types and formatting passed.
Local validation was on macOS arm64. No model execution, local Windows run or full installed-package smoke. Reviewed sources remained unchanged. This review covers this exact head; it does not establish combined-stack validation against current main.
a8a76ba to
3bfbd7e
Compare
5f9dfd4 to
32493da
Compare
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
alandelong-oai
left a comment
There was a problem hiding this comment.
Verified the current own contribution and all touched source/test files are identical to the previously approved revision. The entire head differs only in an inherited test-helper invocation from the reviewed parent. Retained exactly three independent review passes and prior source validation with root verification; no actionable introduced findings remain.
Local evidence is macOS arm64 without model execution or a local Windows run. Hosted CI and merge readiness are separate.
At the prepublication check, current-head CI was still running with no reported failures. Approval is not a claim of completed CI or merge readiness.
# Conflicts: # sdk/typescript/src/security-policy.ts # sdk/typescript/tests-ts/api-policy.test.ts # sdk/typescript/tests-ts/api-post-scan.test.ts # sdk/typescript/tests-ts/component-scan.test.ts # sdk/typescript/tests-ts/security-policy.test.ts
# Conflicts: # sdk/typescript/tests-ts/multiscan.test.ts
# Conflicts: # sdk/typescript/tests-ts/support/shell.ts
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
alandelong-oai
left a comment
There was a problem hiding this comment.
Reviewed exact head b52c30905d49416f95ecc0a9b1242a6679e5e73a against 030d6b382fb1a9c7a6a9d9aeb2d52a018e5742d5. The contribution and all14 touched base/head blobs match the previously reviewed versions. Retained the prior three independent HIGH full-diff/test reviews after root identity verification; no duplicate full review. No serious introduced product finding remains.
Approval is withheld while inherited installed-package/container checks fail on the cleanup assertion described in #1207 (package-behavior.mjs:202). This is a base fixture/cleanup-contract failure at this head, not a new finding in this PR contribution. Correct it upstream and rerun hosted checks.
Local validation: 188 distinct runnable SDK tests verified:187 passed initially,one read-only ps sandbox denial; the unchanged named test passed with permission. Fresh macOS arm64 native host, plugin and SDK builds, types and formatting passed. Reviewed sources are unchanged. No model execution, local Windows run or full installed-package smoke. Source review is complete; merge readiness is not established.
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Publication preparation and receipt handling repeat transformations and fixture setup. Reuse the finding and workbench owners and consolidate equivalent publication operations.
Changes
Testing
Risk and rollout
Publication targets, defaults and receipt behavior remain unchanged. This patch requires the persisted-finding helpers; actual publication is outside local validation.
Stacked on #1210, with its current head merged. This diff contains only the publication changes. After the parent lands, integrate current
main, preserve the publication contribution, rerun checks and retarget this PR tomainbefore merging.Public disclosure review