Skip to content

Submit confirmed factory task injections#255

Merged
kjgbot merged 1 commit into
mainfrom
factory-sdk/v2fix7
Jun 12, 2026
Merged

Submit confirmed factory task injections#255
kjgbot merged 1 commit into
mainfrom
factory-sdk/v2fix7

Conversation

@kjgbot

@kjgbot kjgbot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds FleetClient.sendInput(name, data) and wires InternalFleetClient through to the harness driver's raw PTY input API.
  • Submits '\r' after every confirmed factory waitForInjected ack, including implementer task injects, reviewer queued-message injects, and delivery-failure re-inject retries.
  • Pins ordering and once-only behavior with fake fleet delivery events: full injection resolves first, then exactly one Enter is sent per ack.

Validation

  • npx vitest run packages/factory-sdk/src/orchestrator/factory.test.ts packages/factory-sdk/src/fleet/internal-fleet-client.test.ts -> 84 passed
  • npx vitest run packages/factory-sdk && npx tsc --noEmit -p tsconfig.node.json -> 228 passed, tsc 0

Notes

  • The submit sequence is implemented as waitForInjected(...) resolving before sendInput(target, '\r'); V0 pins that order.
  • The exact PTY submit byte remains live-unproven until factory-verify2 attempt-5 validates '\r' against the codex PTY snapshot oracle.

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@kjgbot, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 20 minutes. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7d8fb0fd-fb82-48a7-aa35-87c91abeb8b7

📥 Commits

Reviewing files that changed from the base of the PR and between dd644a0 and ac34f80.

📒 Files selected for processing (7)
  • packages/factory-sdk/src/fleet/create-fleet.test.ts
  • packages/factory-sdk/src/fleet/internal-fleet-client.test.ts
  • packages/factory-sdk/src/fleet/internal-fleet-client.ts
  • packages/factory-sdk/src/orchestrator/factory.test.ts
  • packages/factory-sdk/src/orchestrator/factory.ts
  • packages/factory-sdk/src/ports/fleet.ts
  • packages/factory-sdk/src/testing/fakes.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch factory-sdk/v2fix7

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kjgbot kjgbot merged commit b451f49 into main Jun 12, 2026
5 checks passed
@kjgbot kjgbot deleted the factory-sdk/v2fix7 branch June 12, 2026 16:28
@agent-relay-code

Copy link
Copy Markdown
Contributor

Implemented one scoped fix in the PR retry path.

Changed factory.ts so a failed critical message id is consumed before retrying. This prevents a replayed duplicate delivery_failed for the old event id from re-injecting and re-submitting the same task again.

Added a regression test in factory.test.ts that emits the same delivery_failed twice and verifies only one retry injection/input occurs.

Addressed comments

  • gemini-code-assist[bot]: quota-limit warning only; no actionable code review comment to fix.
  • coderabbitai[bot]: review-rate-limit warning only; no actionable code review comment to fix.

Advisory Notes

None.

Local validation passed after the edit:

  • npm run verify:mcp-resources-drift
  • npm run lint with existing warnings, no errors
  • npm run typecheck:web
  • npm run typecheck:node
  • npm test
  • npx vitest run
  • npm run build
  • npm run build:web
  • npx playwright test --config playwright.fidelity.config.ts
  • npx playwright test --config playwright.redraw.config.ts

I’m not printing READY because I could not verify GitHub mergeability or all remote required checks from the available connector data.

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