Skip to content

Refuse a second job open --question while an interview ask is open (#737) - #739

Merged
firejune merged 2 commits into
mainfrom
roa/737-refuse-second-pending-ask
Nov 20, 2026
Merged

firejune merged 2 commits into
mainfrom
roa/737-refuse-second-pending-ask

Conversation

@firejune

Copy link
Copy Markdown
Contributor

Closes #737. A second job open --question onto a job with a pending interview ask no longer silently replaces the ask: it refuses JOB_ASK_PENDING.

Measured first: the pinned host can only take the refusal

Review 4.9.1 carries one option set per record publication, and asks only on the head publication (JOB_ACT_SOURCE_STALE otherwise). Every publish marks all pending asks superseded. ask-batch batches only the subjects of one head. Several interview asks with separate acts are #558's one-page publication. A real-host test on base showed that the second --question published, superseded the first ask, and printed nothing.

Change

  • One shared check, refusePendingJobAsks in src/job-close.ts. It holds the existing assertNoPendingJobAsk body, moved, not copied. Its target widens from a package selector to JobSelector | RecordResult (sameTarget in src/job-acts.ts). No new code: the JOB_ASK_PENDING row in docs/CHECKS.md now covers job open --question/--plan.
  • job open --question/--plan runs the check before attaching, so nothing is written on refusal, and again under the job lock before enqueueing.
  • Re-opening the pending question itself still prints "already published".
  • The refusal names rig-create job acts <dir> --wait, then ingest, then re-run.
  • next at the rigging interview names the loop: publish one question, job acts --json --wait, ingest, then the next question. Later questions read "only after the <first> act is ingested".
  • docs/LIVE-REVIEW.md describes the loop and the wider refusal.

Verification

Command Exit Result
bun test tests/job-acts.test.ts -t '#737' 0 2 pass. Real host: the second --question refuses with the whole root byte-identical, and refuses again while the first answer is un-ingested. The first act arrives and is ingested, then the second publishes and its act arrives. Plus the next loop text.
touched files (job-acts, next, agent-guide, job-publication, job-open-ask, record-job-path, direction), local 0 / 1 288 pass, 1 fail. #690 fails identically on base on this Mac (a symlink in the temp dir) and passes on Nova.
Nova typecheck && lint && bun test 0 3170 pass, 3 skip, 0 fail, 149 files
tower preflight: interview --check --json and next --json on 9 cloned pilot records, base vs head 18/18 byte-identical, no new refusal

Notes (not in this PR)

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T16:15:43.441688Z a94581a PR opened
ℹ️ 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.

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

ℹ️ 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 src/job-runtime.ts
requestedRecordResult(root, input.question, input.plan, input.now);
const record = requestedRecordResult(root, input.question, input.plan, input.now);
// Refuse before attaching or writing; openRecordPublication repeats it under the job lock (#737).
if (record) await assertNoPendingJobAsk(root, record);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Recognize relayed interview answers before refusing the next ask

If the owner answers a published question through the supported interview-answer --owner-chat route, opening the next question now refuses JOB_ASK_PENDING even though the first answer is recorded. interviewAnswerCommand removes pending_options but creates no Review act for a chat answer, while pendingJobAsksForTarget recognizes separately recorded answers only for signoffs (signoffSettlesAsk), not interview picks. Consequently, the previous interview ask remains a blocker, and the printed instruction to ingest it cannot work: the recorded answer has already changed the project hash and removed the pending set required for ingestion. Recognize a valid owner-chat answer bound to the published option set before blocking subsequent question or plan publication.

AGENTS.md reference: AGENTS.md:L23-L29

Useful? React with 👍 / 👎.

@firejune

Copy link
Copy Markdown
Contributor Author

Tower ruling on the Codex P1 (src/job-runtime.ts:83): adopted. A relayed interview-answer --owner-chat answer leaves the interview-picks ask pending on the host, so the next --question would refuse forever. The fix settles an interview-picks ask from a live owner-chat answer bound to the same option set (modelled on signoffSettlesAsk). It goes on this PR; no re-review is requested.

firejune and others added 2 commits November 21, 2026 01:50
)

A record publication supersedes every pending ask on the job, and Review
drops an answer to a superseded ask, so four --question opens a few seconds
apart kept only the last answer. job open --question/--plan now runs the
same JOB_ASK_PENDING check the bound writers use: before attaching, and
again under the job lock before enqueueing. Re-opening the same option set
is still allowed. The refusal names the pending ask and
`rig-create job acts <dir> --wait`.

next names the one-question-at-a-time loop on each interview-picks job open
move, and later questions in the same report wait for the earlier act.

Co-Authored-By: Roa <342598975+fj-roa[bot]@users.noreply.github.com>
interview-answer --owner-chat records the answer and clears the pending set
but creates no Review act, so the published interview-picks ask blocked the
next --question or --plan with JOB_ASK_PENDING forever. Settle that ask, as
signoffSettlesAsk does for signoffs, when the question's current answer is
an owner-chat answer bound to the published option set (path, sha256 and the
set id they resolve to). An un-ingested act for the ask still blocks.

Co-Authored-By: Roa <342598975+fj-roa[bot]@users.noreply.github.com>
@firejune
firejune force-pushed the roa/737-refuse-second-pending-ask branch from d631768 to cb3f5fe Compare November 20, 2026 16:52
@firejune
firejune merged commit 9614402 into main Nov 20, 2026
5 checks passed
@firejune
firejune deleted the roa/737-refuse-second-pending-ask branch November 20, 2026 17:16
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.

job open --question into a live job silently replaces the pending interview ask

1 participant