Repository navigation
Implement Nexa 3.0 Open Programs in Code - #2
Conversation
Root cause: NA Solution: Integrate the pinned Open Programs SDK with typed host and Ink workflows for goals, evidence, grants and persistent recovery. Preserve legacy sessions and bind source and environment identities. Risks: Native execution requires OCI and explicit environment setup. Source recovery retains originals for concurrent edit reconciliation. Dependency: Nexa v3.0.0 at 274379606e53c90d2d25774f6bb8984c777d0759 Links: https://github.com/Nexa-Language/Nexa/releases/tag/v3.0.0
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d9f3eaa488
ℹ️ 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".
| if not confirmed: | ||
| rejected = pending.model_copy(update={"state": "rejected"}) | ||
| self.store.set_reference(self.key, pending.digest, rejected) | ||
| return rejected | ||
| if pending.state == "prepared": |
There was a problem hiding this comment.
Preserve the uncommitted answer state when rejecting a sync
If the process stops after prepare() persists its prepared record but before _answer() commits the author answer, the recovered diff can be rejected through /reject-sync. This changes its state to rejected, so a subsequent /sync skips _answer() because it only retries records whose state is prepared. The current revision is still base_revision, causing every confirmation attempt to fail with revision_conflict; the pending record also blocks new answers, builds and runs through ensure_ready(). Preserve whether the answer still needs committing when rejecting the diff, or determine that from the current revision before retrying.
Useful? React with 👍 / 👎.
Root cause: Rejecting a prepared sync hid its uncommitted Author answer. Solution: Inspect the current revision before retrying the saved answer, retaining the existing record format and committed-revision recovery. Cover all four persistence boundaries with and without rejection and require exactly one committed Author answer in every case. Risks: Recovery must preserve revision conflicts and avoid duplicate answers. All 51 affected tests and static checks pass locally. Dependency: NA Links: #2
Root cause: The deadline could expire before the test worker entered its simulated request, making the inflight-closure assertion flaky. Solution: Advance a module-local test clock only after send starts. Keep asyncio's clock real and retain GET/POST closure assertions. Risks: The fixture must still exercise actual task cancellation. Verify deadline and cancel cases with delayed worker startup. Dependency: NA Links: #2
Root cause: Rejecting a prepared sync hid its uncommitted Author answer. Solution: Inspect the current revision before retrying the saved answer, retaining the existing record format and committed-revision recovery. Cover all four persistence boundaries with and without rejection and require exactly one committed Author answer in every case. Risks: Recovery must preserve revision conflicts and avoid duplicate answers. All 51 affected tests and static checks pass locally. Dependency: NA Links: #2
What kind of change does this PR introduce?
Adds a native Nexa 3.0 terminal workflow while retaining the existing 2.4 conversation interface.
What is the current behavior?
The terminal only exposes the legacy Agent/session path. Open Program goals, evidence, revisions and exact patch grants are not available through its host or Ink UI.
What is the new behavior?
Additional context
Runtime: Nexa v3.0.0, commit 274379606e53c90d2d25774f6bb8984c777d0759.
Local evidence: prior full Python suite 113 passed / 1 opt-in provider skipped (including 3 actual OCI cases), Ink 17 passed, real native/legacy PTY and isolated wheel. The source-write completion fix passed all 16 recovery tests and installed-wheel crash probes. The PR review's prepared-sync rejection recovery regression is also fixed: all four persistence boundaries with and without rejection now assert one committed Author answer. All 51 affected Python tests and static checks pass. The rebuilt isolated wheel passes legacy/native smoke, with all 21 Python modules byte-matched to the source and installation; unaffected evidence is reused. Cross-client activity persistence and exact cancellation passed using the packaged extension bridge. Independent review is READY; no paid provider calls were made.
The initial final-head PR CI passed, while its parallel push run exposed an existing HTTP test startup race. A module-local test clock now expires only after the mock request starts; all four GET/POST deadline/cancel cases pass with a 250 ms delayed worker start, and all 10 boundary tests pass. Product code is unchanged by this test correction. Final remote CI must pass before Rebase and merge. Native execution requires the configured environment and pinned OCI image.