Skip to content

[AI] Issue #129: [FEATURE] Early validation of prerequisites and external payloads - #149

Merged
koydas merged 12 commits into
mainfrom
ai/issue-129
Jun 3, 2026
Merged

koydas merged 12 commits into
mainfrom
ai/issue-129

Conversation

@koydas

@koydas koydas commented Jun 2, 2026

Copy link
Copy Markdown
Owner

AI Generated Change

Added validateStartup function to scripts/lib/config.mjs and modified scripts/lib/prompts.mjs to throw with file path if prompt file does not exist

Closes #129

@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: 9d4b3d7c68

ℹ️ 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 scripts/lib/prompts.mjs Outdated
Comment thread scripts/lib/prompts.mjs Outdated
- scripts/lib/prompts.mjs: add existsSync to node:fs import, remove
  require('fs').existsSync call, restore \\w+ in interpolatePrompt regex
- scripts/lib/config.mjs: add existsSync to node:fs import, remove
  require('fs').existsSync calls in validateStartup

https://claude.ai/code/session_01SEVs5KVZr6sYKRRbVe6Rt7
@koydas

koydas commented Jun 2, 2026 •

Copy link
Copy Markdown
Owner Author

🔍 Automated Code Review

🏷️ Change Classification

Type: mixed | Tests expected: yes — Executable code and behavioral files are modified.

✅ Summary

  • Added validateStartup() to scripts/lib/config.mjs for early validation of required env vars and prompt files
  • Updated CI workflow to expose necessary GitHub context variables
  • Enhanced prompt loading to throw with file path on missing prompts
  • Updated docs/code-generation.md to reflect test coverage requirements

⚠️ Issues Found

  • [HIGH] Documentation deletion regression — File: docs/code-generation.md Lines: 25-146 Root cause: Removed 121 lines describing prompt caching and detailed test coverage policy without explicit issue request Fix: Revert the deleted content or explicitly request documentation removal in the issue

🚀 Verdict

REQUEST_CHANGES

@koydas koydas added the changes-requested Automated code review found issues requiring changes label Jun 2, 2026

koydas commented Jun 2, 2026

Copy link
Copy Markdown
Owner Author

@codex review


Generated by Claude Code

@github-actions github-actions Bot added the auto-fix-attempt-1 Auto-fix iteration 1 label Jun 2, 2026

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

ℹ️ 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 scripts/lib/config.mjs Outdated
Comment thread .github/workflows/test.yml Outdated
…est.yml

- scripts/lib/config.mjs: remove @jest/globals import and test cases
  appended by auto-fix; tests belong in scripts/tests/, not production modules
- .github/workflows/test.yml: restore c8 coverage steps replaced by
  non-existent npm run coverage script

https://claude.ai/code/session_01SEVs5KVZr6sYKRRbVe6Rt7

koydas commented Jun 2, 2026

Copy link
Copy Markdown
Owner Author

@codex review


Generated by Claude Code

@koydas koydas added changes-requested Automated code review found issues requiring changes and removed changes-requested Automated code review found issues requiring changes labels Jun 2, 2026

@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: 58f0b44fb1

ℹ️ 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 scripts/lib/config.mjs Outdated
Comment thread scripts/lib/config.mjs Outdated
- scripts/generate_issue_change.mjs: call validateStartup() at the top of
  main() for early prerequisite and prompt-file validation
- scripts/tests/config.test.mjs: add 7 tests covering all env-var failure
  branches and the happy path of validateStartup
- scripts/tests/entrypoints.test.mjs: add GitHub startup env vars to
  generate_issue_change tests broken by the new validateStartup call
- scripts/tests/github_output.test.mjs: same fix for integration tests

https://claude.ai/code/session_01SEVs5KVZr6sYKRRbVe6Rt7

koydas commented Jun 2, 2026

Copy link
Copy Markdown
Owner Author

@codex review


Generated by Claude Code

@koydas koydas added changes-requested Automated code review found issues requiring changes and removed changes-requested Automated code review found issues requiring changes labels Jun 2, 2026

@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: 10e0fa5146

ℹ️ 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 scripts/lib/config.mjs
- .github/workflows/code-generation.yml: pass GITHUB_TOKEN,
  GITHUB_REPOSITORY, GITHUB_EVENT_PATH explicitly in the Generate AI
  change step so validateStartup() prerequisites are met
- CHANGELOG.md: add [Unreleased] Changed entry for the validateStartup
  call added to scripts/generate_issue_change.mjs (PR #149)

https://claude.ai/code/session_01SEVs5KVZr6sYKRRbVe6Rt7

koydas commented Jun 2, 2026

Copy link
Copy Markdown
Owner Author

@codex review


Generated by Claude Code

@koydas koydas added changes-requested Automated code review found issues requiring changes and removed changes-requested Automated code review found issues requiring changes labels Jun 2, 2026

@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: 8402001b0c

ℹ️ 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 scripts/lib/config.mjs Outdated
Comment thread docs/code-generation.md Outdated
…on docs

- scripts/lib/config.mjs: validateStartup() now checks generation-system.md
  instead of auto-fix-system.md, matching what generate_issue_change.mjs
  actually loads at runtime
- docs/code-generation.md: restore full operator documentation stripped by
  auto-fix attempt 1 (b3612c6)

https://claude.ai/code/session_01SEVs5KVZr6sYKRRbVe6Rt7

koydas commented Jun 2, 2026

Copy link
Copy Markdown
Owner Author

@codex review


Generated by Claude Code

@koydas koydas added changes-requested Automated code review found issues requiring changes and removed changes-requested Automated code review found issues requiring changes labels Jun 2, 2026

@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: 1a79797a7a

ℹ️ 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 scripts/lib/config.mjs Outdated
ISSUE_BODY is optional — loadConfigFromEnv() applies a '(no body provided)'
fallback for empty/absent values. Requiring it in validateStartup() would
abort generation for valid issues with no body before the fallback runs.
Updated CHANGELOG entry and removed the corresponding test case.

https://claude.ai/code/session_01SEVs5KVZr6sYKRRbVe6Rt7

koydas commented Jun 2, 2026

Copy link
Copy Markdown
Owner Author

@codex review


Generated by Claude Code

@koydas koydas added changes-requested Automated code review found issues requiring changes and removed changes-requested Automated code review found issues requiring changes labels Jun 2, 2026

@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: 64f6fabfb4

ℹ️ 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 docs/code-generation.md Outdated
Comment thread docs/code-generation.md Outdated
- CI Coverage section: config.mjs, llm_client.mjs, and output_writer.mjs
  are all CI-enforced (≥80%) via dedicated c8 steps in test.yml; the doc
  incorrectly said only checkpoint.mjs was enforced.
- Cross-workflow artifact download: auto-fix-pr uses gh api + curl
  (GET /actions/artifacts?name=...) not gh run list.

https://claude.ai/code/session_01SEVs5KVZr6sYKRRbVe6Rt7
@koydas koydas added changes-requested Automated code review found issues requiring changes and removed changes-requested Automated code review found issues requiring changes labels Jun 3, 2026

koydas commented Jun 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review


Generated by Claude Code

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

ℹ️ 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 docs/code-generation.md Outdated
The 'CI Coverage Enforcement' section still listed only checkpoint.mjs
and said config.mjs was code-review-only. Updated to list all four
c8-enforced modules (checkpoint, config, llm_client, output_writer).

https://claude.ai/code/session_01SEVs5KVZr6sYKRRbVe6Rt7
@koydas koydas added changes-requested Automated code review found issues requiring changes and removed changes-requested Automated code review found issues requiring changes labels Jun 3, 2026

koydas commented Jun 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review


Generated by Claude Code

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

ℹ️ 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 scripts/lib/config.mjs
Adds two tests covering the generation-system.md and generation-user.md
missing-file branches of validateStartup(), completing coverage of all
failure paths required by AGENTS.md for new exported functions.

https://claude.ai/code/session_01SEVs5KVZr6sYKRRbVe6Rt7

koydas commented Jun 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review


Generated by Claude Code

@koydas koydas added changes-requested Automated code review found issues requiring changes and removed changes-requested Automated code review found issues requiring changes labels Jun 3, 2026

@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: 8aba7fc53d

ℹ️ 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 scripts/tests/config.test.mjs Outdated
Replace renameSync-based tests with isolated temp directories to avoid
mutating shared prompt fixtures during concurrent test runs. validateStartup
now accepts an optional promptsDirOverride for this purpose; production
callers pass no argument and get the real prompts directory as before.

https://claude.ai/code/session_01SEVs5KVZr6sYKRRbVe6Rt7

koydas commented Jun 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review


Generated by Claude Code

@koydas koydas added changes-requested Automated code review found issues requiring changes and removed changes-requested Automated code review found issues requiring changes labels Jun 3, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

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

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

@koydas
koydas merged commit 69221d4 into main Jun 3, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-fix-attempt-1 Auto-fix iteration 1 changes-requested Automated code review found issues requiring changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Early validation of prerequisites and external payloads

2 participants