Skip to content

feat(task): verify prompt file digests - #712

Open
ALV0612 wants to merge 2 commits into
openai:mainfrom
ALV0612:fix/issue-621-verify-prompt-file-digest
Open

feat(task): verify prompt file digests#712
ALV0612 wants to merge 2 commits into
openai:mainfrom
ALV0612:fix/issue-621-verify-prompt-file-digest

Conversation

@ALV0612

@ALV0612 ALV0612 commented Sep 2, 2026

Copy link
Copy Markdown

Summary

  • add optional --prompt-file-sha256 <digest> verification for task --prompt-file
  • hash and decode one file buffer so approval, dispatch, and the receipt cannot refer to different reads
  • preserve verified prompt-file text verbatim through turn/start, including leading/trailing whitespace and the common final newline
  • expose the unambiguous promptFileSha256 receipt in foreground JSON and persisted background requests/results
  • reject malformed/mismatched digests before creating a job or Codex thread

Codex review follow-up

Addressed the P2 finding in commit a8f21dd:

  • removed the later prompt-file .trim() mismatch at the app-server transport boundary
  • carried explicit prompt source metadata through detached workers
  • renamed the raw-file receipt from promptSha256 to promptFileSha256
  • added foreground and background regression tests with leading spaces, trailing spaces, and a final newline
  • retained existing positional/stdin normalization and covered it separately

Verification

  • OpenSpec change fix-issue-621-verify-prompt-file-digest: valid
  • focused integrity/whitespace tests: 8/8 pass
  • full test suite: 104/104 pass
  • npm run build: pass
  • npm run check-version: pass
  • syntax checks and git diff --check: pass

Fixes #621

@ALV0612
ALV0612 requested a review from a team September 2, 2026 03:14

@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: deebd7a815

ℹ️ 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 plugins/codex/scripts/lib/task-prompt.mjs
@ALV0612

ALV0612 commented Sep 2, 2026

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: a8f21dd608

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

task --prompt-file: the file is re-read by the launcher, so a caller cannot prove which bytes were dispatched

1 participant