Skip to content

feat(publish): select findings and verify publication payloads - #484

Open
mldangelo-oai wants to merge 9 commits into
mainfrom
mdangelo/codex/select-publication-findings
Open

feat(publish): select findings and verify publication payloads#484
mldangelo-oai wants to merge 9 commits into
mainfrom
mdangelo/codex/select-publication-findings

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Select findings for publication and require the same prepared payload that was
reviewed in a dry run. Both controls are opt-in; publishing still defaults to
all findings and new issues.

Changes

  • Add repeatable publish scan --finding FINDING_ID and SDK findingIds.
  • Return required payloadDigest; accept optional --expect-digest DIGEST
    and SDK expectedDigest. Omitting the expected digest skips enforcement.
  • Bind the pending issue payload, scan, destination and requested assignee.
    Assigned previews use HMAC-SHA-256 with the selected Linear API credential;
    unassigned digests remain credential-independent.
  • Verify the complete sealed scan and local history while sending only the
    selected findings. With --skip-existing, the digest covers pending issues.
  • Remove the wall-clock Uploaded line from new issue descriptions so unchanged
    inputs produce stable previews.
  • Merge main, shorten the workflow documentation and remove unnecessary
    smoke-test variable extraction. Eight net lines removed during simplification.
  • Await the MCP subprocess and both output streams in the tool-name CI regression,
    preserving its protocol messages, timeout, exit-code and tool-name assertions.

Testing

On ba069c3128cde53c2a560743891a135726c771bd:

  • Publication, CLI, integration and tool-name tests: 191 passed; the one
    sandbox-blocked process-group check passed outside the sandbox.
  • Types, formatting, build and diff checks passed.
  • Fresh archive: 277 entries validated.
  • Installed-package smoke passed public imports, strict NodeNext consumer types,
    selected/digest and direct CLI previews, credential locking, bundled plugin
    files, bundled Codex and nested-worker execution without global Codex.
  • No live Linear issues were created.

Final main refresh (01bd062): 210 publication/CLI/tool-name tests passed;
types/models, formatting, build, static package validation and full installed
smoke passed again, including selected/digest previews under the network guard.
Selection, digest and integration-test code are unchanged by the clean merge.
The bundle matches main's 0.1.60; a real cached-0.1.59 upgrade matched all 118
plugin files and preserved credentials.

The full suite and native Windows were not rerun. The earlier Windows tool-name
failure could not be reproduced locally. Its fixture now uses the asynchronous
process path and passes locally; native confirmation remains necessary.
New-head CI remains for the second pass.

  • Final main refresh (fd98a90): package 0.1.21 includes the MCP launcher-permission fix; feature source and bundled payload are unchanged. Types/model generation, formatting, build, 238 focused tests, static artifact verification and full installed-package smoke passed, including MCP initialization. CI was not awaited.

Risk and rollout

Selection and digest enforcement are opt-in, but publication results now require
payloadDigest, and issue descriptions omit Uploaded. Callers assigning an issue
must use the same assignee and API credential for preview and publication.
Changing either requires a new preview.

The digest confirms the local prepared request, not permissions or the final
remote representation. Keep saved previews private. No dependency, migration,
automatic retry, deduplication or package release is added.

Public disclosure review

New content uses generic descriptions and synthetic fixtures. Existing corporate
author metadata and restricted automated review links remain in public history,
so the second attestation is unchecked.

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the exact head f15825c, especially selected-only remote writes, full-scan history validation, and the opt-in preview digest contract.

@github-actions github-actions Bot added the enhancement New feature or request label Aug 16, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: f15825ca40

ℹ️ 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".

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the new exact head 0ae2930. The installed-package smoke caught an existing privacy contract: results must not echo the requested assignee identity. The follow-up removes that output while keeping the assignee bound into the digest. The rebuilt installed-package smoke now passes, including matching and mismatched digest checks; full and randomized suites are running.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 0ae2930f16

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 0ae2930f16

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@mldangelo-oai
mldangelo-oai marked this pull request as ready for review August 16, 2026 08:04
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Final validation and ready-for-review update; the head remains 0ae2930. Both local full-suite orders passed 1,300 tests, the installed-package smoke passed, and the isolated macOS CI rerun is green. Please retain review on this exact head.

@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: 0ae2930f16

ℹ️ 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 thread sdk/typescript/src/publish.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 0ae2930f16

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review Exact current head is 0ae2930. I have returned this PR to draft while addressing the assigned-digest privacy feedback; a new exact-head review will follow the additive fix.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 0ae2930f16

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 0ae2930f16

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review Please review exact head 6f789c3. The assigned-approval privacy feedback is fixed additively; full and randomized suites each passed 1,300 tests, and the fresh installed-package smoke passed.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 6f789c3ede

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 6f789c3ede

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@mldangelo-oai
mldangelo-oai marked this pull request as ready for review August 16, 2026 08:46
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review Current head 6f789c3 is ready again. The targeted Windows retry and all current-head checks passed; please retain review on this exact SHA.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 6f789c3ede

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 6f789c3ede

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

zcrab-oai
zcrab-oai previously approved these changes Aug 16, 2026

@zcrab-oai zcrab-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed selected-only publication, finding and destination binding, keyed assignee commitments, and history validation.

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review current head c6272de380ec367538313674bbadf359112fbcea critically after the additive main integration.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: c6272de380

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: c6272de380

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@mldangelo-oai mldangelo-oai changed the title feat: publish reviewed finding selections feat(publish): select findings and verify publication payloads Aug 22, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-27T08:42:02.805662Z 2c66d91 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review exact head 4bfc090abf42e41f2d70f8eb246d98fd1370b6c1 after the current-main merge and publication-contract cleanup. Focus on selected-only remote writes, full-scan local verification, digest binding, the required result contract, and cancellation propagation.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex security review

Please review exact head 4bfc090abf42e41f2d70f8eb246d98fd1370b6c1. Focus on pre-mutation digest enforcement, credential-keyed assigned previews, selected-finding publication, and sensitive output boundaries.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

Unknown error
ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 4bfc090abf

ℹ️ 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".

@kmbroai kmbroai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Critical review

Reviewed head 4bfc090abf42e41f2d70f8eb246d98fd1370b6c1.

Recommendation: keep finding selection; the optional reviewed-payload check is also justified. No new blocking correctness defect found in this diff. Publishing a selected subset is a concrete workflow requirement. Binding a later publication to the exact preview is useful for automation, provided it remains distinct from authorization and remote verification.

Correctness

selectPublicationFindings and publicationPayloadDigest reject unknown IDs, deduplicate selection, and preserve the canonical publication order. The digest includes destination, scan identity, occurrence IDs, and the actual issue content. The expected-digest comparison runs before publication-store preparation or issue creation. Using the full scan when validating/persisting local history avoids mistaking a selected subset for the complete stored finding inventory.

Removing the wall-clock “Uploaded” field is necessary for stable previews; Linear already records creation time. The current assigned-preview HMAC also addresses the prior enumerable-assignee concern: a plain hash of a low-entropy email and otherwise disclosed fields would not hide the email. Credential rotation intentionally invalidates an assigned preview and is documented. Unassigned previews remain credential-independent.

Simplification and integration

Keep this a small deterministic comparison, not an approval-token service or persisted approval state machine. A direct digest equality check is sufficient here because the digest is caller-supplied approval data, not an authentication secret. The preview itself still contains sensitive finding content and must be kept private.

Coordinate composition with #486 before merging both. Selection, --skip-existing, and --expect-digest need an explicit ordering: the checked digest must describe the exact set intended for the subsequent mutation, while history validation must still receive the full scan. Add one combined-case regression when the branches meet rather than separate logic in each command. This is an integration requirement, not a reproduced defect in either isolated head.

Verification

Ran cli-publish, publication integration, preparation, and publisher suites: 117 passed, 0 failed, including changed payload/destination/assignee/credential rejection and selected publication behavior. Linux, Bun 1.3.14 / Node 22.13.1 with cached dependencies. I did not run the installed-package smoke or contact Linear; passing local digest checks does not establish remote permission or issue persistence.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants