Skip to content

fix(work): cap queue directory entries and hand native branches between attempts - #1265

Open
n0rpan wants to merge 2 commits into
mainfrom
agent/queue-findings-fix
Open

n0rpan wants to merge 2 commits into
mainfrom
agent/queue-findings-fix

Conversation

@n0rpan

@n0rpan n0rpan commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to review findings that landed with #407.

  • Every queue directory entry (hidden, non-JSON, directories) now counts against a hard 4,096-entry limit before filtering, so a repository-controlled queue directory cannot keep the controller busy with ignored entries.
  • A native attempt's branch is handed to the next attempt on the same branch: a finished, clean earlier attempt keeps its files and receipt with HEAD detached at the branch tip (the second attempt was blocked before with 'already used by worktree').

Tests: queue_counts_ignored_entries_against_the_directory_limit, new oxa-cli/tests/work_native_handoff.rs. Local: oxa-work, work_native_handoff, work_cli, work_continue green.

🤖 Generated with Claude Code

n0rpan and others added 2 commits November 18, 2026 02:27
The queue scan applied MAX_QUEUE_FILES only to visible regular .json
inputs; hidden, non-JSON and non-regular entries were read and skipped
without limit on every watch iteration. Each entry returned by read_dir
now counts against MAX_QUEUE_ENTRIES (4096) before filtering, and the scan
stops with an error past it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each native board admission gets its own task id (it includes the lease
generation) and therefore its own worktree. A later attempt on the same
branch could not add its worktree while the finished earlier attempt
still had the branch checked out.

The reviewed-PR handoff now also covers native attempts: when the branch
is attached to a finished, clean native attempt's worktree in the same
worktree directory, that worktree's HEAD is detached at the branch tip and
the new attempt checks out the branch. The earlier worktree's files and
receipt are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@n0rpan

n0rpan commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@n0rpan

n0rpan commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 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-18T01:44:50.635954Z bf2f1da Manual request
🔒 Security Review ✅ Completed 2026-11-18T01:43:25.903045Z bf2f1da Manual request
ℹ️ 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

Copy link
Copy Markdown

🛡️ Codex Security Review

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

Reviewed commit: bf2f1dad0b

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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: bf2f1dad0b

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

This branch has not been deployed

No deployments
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.

1 participant