Skip to content

release: v0.3.8 runtime reliability - #31

Merged
echoVic merged 2 commits into
mainfrom
codex/orca-0.3.8-release
Aug 7, 2026
Merged

release: v0.3.8 runtime reliability#31
echoVic merged 2 commits into
mainfrom
codex/orca-0.3.8-release

Conversation

@echoVic

@echoVic echoVic commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • prepare the Orca v0.3.8 patch release
  • improve long-session recovery, durable subagent paging, background notices, MCP recovery, JSONL writer safety, and workflow token budgets
  • update release documentation, changelog, website metadata, and npm/Cargo versions

Verification

  • 1054 TUI tests passed
  • 2536 workspace tests passed
  • PTY, clippy, format, runtime surface, Windows boundary, release-script, site build, SEO, repository hygiene, and Terminal Bench checks passed

Summary by CodeRabbit

  • New Features
    • Added workflow token budgets with validation, exhaustion handling, usage warnings, and detailed totals.
    • Added paginated subagent status results with offsets, limits, and continuation metadata.
    • Added transcript paths and remaining-token visibility to workflow panels.
    • Improved background-task completion notifications, including result availability.
  • Bug Fixes
    • Preserved pending steering inputs across cancelled generations and resumed sessions.
    • Improved session history recovery and protection against conflicting event sequences.
  • Documentation
    • Added v0.3.8 release notes and updated product documentation, roadmap, and changelogs.
    • Updated the release version to v0.3.8.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The release adds run-level workflow token budgets, paginated subagent results, steering-input recovery, counted compaction replay, locked event-sequence reservations, expanded TUI status reporting, and v0.3.8 release metadata.

Changes

Workflow token budgets

Layer / File(s) Summary
Budget contracts and tool inputs
crates/orca-core/src/workflow_types.rs, crates/orca-runtime/src/workflow/..., crates/orca-tools/src/registry.rs, tests/workflow_types_contract.rs
Workflow inputs accept optional token budgets. Workflow outputs serialize total, spent, and remaining values. Tool schemas and contract tests cover the fields.
Budget enforcement and status reporting
crates/orca-runtime/src/workflow/runner.rs, crates/orca-runtime/src/workflow_execution.rs
Workflow execution restores budgets, settles child-agent usage, blocks exhausted agents, cancels exhausted runs, and renders budget warnings.
Budget behavior documentation
crates/orca-runtime/src/system_prompt.rs, docs/agent-workflow-benchmark.md
Runtime guidance and benchmark documentation describe token-budget reporting and exhaustion behavior.

Runtime persistence and paginated results

Layer / File(s) Summary
Paginated subagent status
crates/orca-runtime/src/runtime_special.rs, crates/orca-runtime/src/controller.rs, crates/orca-tools/src/registry.rs
Subagent status accepts bounded character offsets and limits. Responses include page length, offset, and continuation metadata.
Steering input recovery
crates/orca-runtime/src/runtime_host.rs, crates/orca-runtime/tests/runtime_host.rs
Pending steering inputs are persisted as user messages when continuation paths drain them. Cancellation coverage verifies recovery.
Compaction replay matching
crates/orca-runtime/src/history.rs
Matching compaction summaries are counted and consumed one at a time.
Locked event-sequence reservations
crates/orca-runtime/src/thread_store/writer.rs
Session writers share event-sequence cursors, validate persisted state under lock, and reject stale reservations.

TUI task and workflow reporting

Layer / File(s) Summary
Background-task completion notices
crates/orca-tui/src/hosted_runtime.rs
Notices now cover all backgrounded task types and identify completed results.
Workflow and context status rendering
crates/orca-tui/src/ui.rs
Workflow panels display transcript paths. Context status lines display remaining tokens. Rendering tests cover both changes.

v0.3.8 release surface

Layer / File(s) Summary
Version and release metadata
Cargo.toml, npm/orca/package.json, site/src/shared.ts, site/src/changelog/Changelog.tsx, site/public/sitemap.xml
Package versions and site release metadata advance to v0.3.8.
Release documentation
docs/releases/v0.3.8.md, docs/production-roadmap.md, docs/tools-comparison.md, docs/agent-workflow-benchmark.md
Release notes, roadmap content, benchmark references, and comparison baselines describe the v0.3.8 changes.
Runtime surface validation baseline
scripts/validate-runtime-surface-contract.mjs
The validation baseline records additional harmless token-clear sites and an updated candidate-clear count.
Release-gated Pages deployment
.github/workflows/release.yml, .github/workflows/pages.yml
Pages deployment waits for release verification and the matching published release.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant WorkflowDraftAction
  participant WorkflowRunner
  participant WorkflowExecutionGate
  participant ChildAgent
  participant WorkflowOutput
  WorkflowDraftAction->>WorkflowRunner: launch with tokenBudget
  WorkflowRunner->>WorkflowExecutionGate: initialize budget and resumed spend
  WorkflowRunner->>WorkflowExecutionGate: reserve child-agent capacity
  WorkflowExecutionGate->>ChildAgent: grant capped token allowance
  ChildAgent-->>WorkflowExecutionGate: settle token usage
  WorkflowRunner->>WorkflowOutput: report total, spent, and remaining
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 46.43% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the v0.3.8 release and its primary runtime reliability improvements.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/orca-0.3.8-release

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 5

🧹 Nitpick comments (1)
site/src/shared.ts (1)

7-14: 🎯 Functional Correctness | 🔵 Trivial

Verify release sequencing before publishing the latest entry.

The review date is August 6, 2026, but Line 12 declares August 7, 2026 and Line 13 links to the v0.3.8 release. That release currently returns 404, while the public changelog still lists v0.2.50 as latest. ()

If the site deploys before the GitHub tag exists, users will see a future-dated latest entry with a broken release-notes link. Create the release first, or gate the site metadata, sitemap, and roadmap deployment on the same release step.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@site/src/shared.ts` around lines 7 - 14, Ensure the v0.3.8 GitHub release and
tag exist before publishing the metadata in releaseVersion and releases. If the
release cannot be created first, gate the site metadata, sitemap, and roadmap
deployment on that release step so the latest entry is neither future-dated nor
linked to an unavailable URL.

Source: MCP tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/orca-runtime/src/workflow/runner.rs`:
- Around line 474-478: Update the token budget snapshot construction in
execute_prepared to use the resumed run’s recorded prior child usage instead of
hardcoding spent as 0, while preserving the existing behavior for fresh
launches. Add a test covering a resumed background launch that verifies the
reported spent amount and remaining capacity reflect prior usage before new
agents are started.
- Around line 297-304: Update begin_agent and the concurrent child execution
paths to reserve bounded token capacity against token_budget before starting
each child, preventing concurrent starts from exceeding the remaining budget.
Reconcile the reservation with actual settled usage when each child completes,
including the related checks at the other execution sites. If pre-start
reservation cannot be implemented, change the behavior and wording to explicitly
describe a post-settlement cutoff rather than a hard budget.
- Around line 1787-1797: Update the warning calculation in the budget_line
closure to compare the 80% threshold using widened arithmetic instead of
saturating u64 multiplication. Preserve the existing conditions, including
budget.remaining > 0, while ensuring large valid budgets are evaluated by their
actual spent-to-total ratio.

In `@crates/orca-runtime/tests/runtime_host.rs`:
- Around line 2050-2053: Update the assertions in the runtime host recovery test
around thread.snapshot() to require exactly one matching user message rather
than merely any match, and additionally verify that neither generation consumed
the queued steer input. Preserve the existing snapshot validation while
explicitly asserting the queued steer-input state after both generations.

In `@docs/agent-workflow-benchmark.md`:
- Around line 299-309: Renumber the later “Resume/fork stress coverage”
follow-up entry from item 13 to item 14, preserving its existing content and
leaving the agent teams item as 13.

---

Nitpick comments:
In `@site/src/shared.ts`:
- Around line 7-14: Ensure the v0.3.8 GitHub release and tag exist before
publishing the metadata in releaseVersion and releases. If the release cannot be
created first, gate the site metadata, sitemap, and roadmap deployment on that
release step so the latest entry is neither future-dated nor linked to an
unavailable URL.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8bf8e8d0-deb6-4606-8beb-a9a762eaf12d

📥 Commits

Reviewing files that changed from the base of the PR and between 7d86f54 and 716325f.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (25)
  • Cargo.toml
  • crates/orca-core/src/workflow_types.rs
  • crates/orca-runtime/src/controller.rs
  • crates/orca-runtime/src/history.rs
  • crates/orca-runtime/src/runtime_host.rs
  • crates/orca-runtime/src/runtime_special.rs
  • crates/orca-runtime/src/system_prompt.rs
  • crates/orca-runtime/src/thread_store/writer.rs
  • crates/orca-runtime/src/workflow/command.rs
  • crates/orca-runtime/src/workflow/runner.rs
  • crates/orca-runtime/src/workflow_execution.rs
  • crates/orca-runtime/tests/runtime_host.rs
  • crates/orca-tools/src/registry.rs
  • crates/orca-tui/src/hosted_runtime.rs
  • crates/orca-tui/src/ui.rs
  • docs/agent-workflow-benchmark.md
  • docs/production-roadmap.md
  • docs/releases/v0.3.8.md
  • docs/tools-comparison.md
  • npm/orca/package.json
  • scripts/validate-runtime-surface-contract.mjs
  • site/public/sitemap.xml
  • site/src/changelog/Changelog.tsx
  • site/src/shared.ts
  • tests/workflow_types_contract.rs

Comment thread crates/orca-runtime/src/workflow/runner.rs Outdated
Comment thread crates/orca-runtime/src/workflow/runner.rs Outdated
Comment thread crates/orca-runtime/src/workflow/runner.rs
Comment thread crates/orca-runtime/tests/runtime_host.rs Outdated
Comment thread docs/agent-workflow-benchmark.md Outdated

@coderabbitai coderabbitai 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.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/pages.yml:
- Around line 38-45: Update the release lookup in the Pages workflow so only a
confirmed missing or unpublished release writes ready=false; use structured gh
release view output such as publishedAt to determine availability. Capture
lookup failures, distinguish the missing-release status from authentication,
rate-limit, network, and API errors, and fail the release gate for all other
errors.

In @.github/workflows/release.yml:
- Around line 526-536: Update the pages workflow dispatch in the release job to
pass github.ref_name as a workflow_dispatch input, and update the pages workflow
gate to require that input matches the version read from site/src/shared.ts
before building or deploying. Use the dispatched tag rather than the main branch
ref to ensure Pages deploys the verified release.

In `@crates/orca-runtime/src/workflow/runner.rs`:
- Around line 1262-1273: Update the child execution path around
run_child_agent_call so the permit’s budget_cap is enforced by the child runtime
during execution, not only validated after the call returns. Pass the
reservation through the child execution-limit mechanism while preserving the
existing settle_usage handling, and add coverage for a child reporting usage
above its reservation.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 15be9c78-afad-46f6-b0eb-d4d4f9e79a8a

📥 Commits

Reviewing files that changed from the base of the PR and between 716325f and 6cbd657.

📒 Files selected for processing (8)
  • .github/workflows/pages.yml
  • .github/workflows/release.yml
  • crates/orca-runtime/src/system_prompt.rs
  • crates/orca-runtime/src/workflow/runner.rs
  • crates/orca-runtime/tests/runtime_host.rs
  • crates/orca-tools/src/registry.rs
  • docs/agent-workflow-benchmark.md
  • docs/releases/v0.3.8.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • docs/releases/v0.3.8.md
  • crates/orca-runtime/src/system_prompt.rs
  • crates/orca-tools/src/registry.rs
  • docs/agent-workflow-benchmark.md
  • crates/orca-runtime/tests/runtime_host.rs

Comment on lines +38 to +45
version="$(sed -nE 's/^export const releaseVersion = "([^"]+)";$/\1/p' site/src/shared.ts)"
test -n "$version"
if gh release view "$version" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
echo "ready=true" >> "$GITHUB_OUTPUT"
else
echo "GitHub Release $version is not published yet; defer Pages deployment."
echo "ready=false" >> "$GITHUB_OUTPUT"
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'Files matching pages workflow:\n'
fd -a 'pages\.yml$' . | sed 's#^\./##'

printf '\nRelevant workflow excerpt:\n'
if [ -f .github/workflows/pages.yml ]; then
  nl -ba .github/workflows/pages.yml | sed -n '1,90p'
fi

printf '\nSearch for release gate usages:\n'
rg -n "ready=|pages-build-deployment|releaseVersion|gh release view|site/src/shared.ts" .github site 2>/dev/null || true

printf '\nShared release version declaration:\n'
if [ -f site/src/shared.ts ]; then
  nl -ba site/src/shared.ts | sed -n '1,120p'
fi

Repository: echoVic/orca-agent

Length of output: 255


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'Files matching pages workflow:\n'
git ls-files '.github/workflows/pages.yml' | sed 's#^\./##' || true

printf '\nRelevant workflow excerpt:\n'
if [ -f .github/workflows/pages.yml ]; then
  awk '{printf "%6d\t%s\n", NR, $0}' .github/workflows/pages.yml | sed -n '1,100p'
fi

printf '\nSearch for release gate usages:\n'
if git ls-files | grep -E '(^|/)(\.github/workflows/pages\.yml|site/src/shared\.ts)$' >/tmp/fileslist; then
  grep -n -H "ready=\|pages-build-deployment\|releaseVersion\|gh release view\|site/src/shared.ts" "$(cat /tmp/fileslist)" 2>/dev/null || true
fi

printf '\nShared release version declaration:\n'
if [ -f site/src/shared.ts ]; then
  awk '{printf "%6d\t%s\n", NR, $0}' site/src/shared.ts | sed -n '1,140p'
fi

Repository: echoVic/orca-agent

Length of output: 7938


🌐 Web query:

GitHub CLI gh release view --json exit code 404 documentation

💡 Result:

The GitHub CLI (gh) does not return a specific exit code 404 when a release is not found [1]. Instead, when the gh release view command fails to locate the specified release, it returns exit code 1 [1][2]. In the GitHub CLI, exit code 1 is the standard convention for general errors, including cases where a requested resource (like a release or repository) cannot be found [1]. While some manual pages for the GitHub CLI document specific exit codes like 4 for "Authentication required" [3][4][5], they do not list 404 as a specific exit code for gh release view. You should expect an exit code of 1 for "not found" scenarios [1][2].

Citations:


🌐 Web query:

GitHub CLI gh release view structured JSON output fields exit-code 4

💡 Result:

In the GitHub CLI (gh), the command gh release view supports structured JSON output and adheres to established exit code conventions. JSON Output To obtain structured JSON output, use the --json flag followed by the specific fields you wish to retrieve [1][2]. The available fields include: apiUrl, assets, author, body, createdAt, databaseId, id, isDraft, isImmutable, isPrerelease, name, publishedAt, tagName, tarballUrl, targetCommitish, uploadUrl, url, and zipballUrl [1][3]. You can further refine or format this output using the following flags: - --jq: Filters the JSON output using a jq expression [1][4]. - --template: Formats the JSON output using a Go template [1][4]. Exit Code 4 The exit code 4 in the context of the GitHub CLI signifies that authentication is required to execute the command [3][5]. If you encounter this exit code, ensure that you are authenticated with GitHub (e.g., by running gh auth login) and that your credentials have the necessary permissions for the repository [2][3]. Standard exit codes for the GitHub CLI generally follow these conventions: 0: Successful execution [3][5] 1: Error (e.g., resource not found, network issues) [3][6] 2: Command canceled [3][5] 4: Authentication required [3][5] Note that while these codes are widely used across the CLI, specific commands may occasionally return additional, command-specific exit codes [3][5].

Citations:


🌐 Web query:

gh release view GitHub CLI 404 error message not found

💡 Result:

Receiving a "404 Not Found" or "release not found" error when using gh release view typically indicates that the GitHub CLI cannot locate the specified release based on your current request, permissions, or the state of the repository [1][2]. Common causes and solutions include: 1. No "Latest" Release Exists: When gh release view is executed without a specific tag argument, it defaults to searching for the "latest" release [3][4]. GitHub defines a "latest" release specifically as a full (stable) release [3]. If your repository only contains pre-releases or drafts, the command will fail with a 404 error because no stable "latest" release exists [3]. Solution: Explicitly provide the tag name (e.g., gh release view <tag_name>) to view a pre-release or specific version [3]. 2. Replication Lag in CI/CD: In automated workflows, such as GitHub Actions, there can be a slight delay (a few seconds) between the time a release is created (e.g., via gh release create) and when it becomes discoverable by subsequent gh commands [5][6]. Solution: Add a brief pause (e.g., sleep 5) after creating the release before attempting to view or modify it [5][6]. Alternatively, use a single command to perform operations (like uploading assets) during the creation step itself [6]. 3. Insufficient Permissions or Authentication: If the repository is private, the GH_TOKEN or credentials provided to the CLI may not have the necessary permissions to access the release [1][7]. In GitHub Actions, the default GITHUB_TOKEN is scoped only to the repository where the workflow is running; it cannot access other repositories unless specifically configured with a wider-scoped token, such as a Personal Access Token (PAT) [7]. Solution: Ensure your authentication token has sufficient read permissions for the target repository [1][7]. 4. Incorrect Tag Name: The gh release commands expect a Git tag name, not necessarily the display name of the GitHub release [2]. Solution: Use gh release list to verify the exact tag names available in the repository, and use the correct tag when running gh release view <tag> [2]. 5. Draft Releases: gh release view may struggle to find draft releases if they have not been properly initialized or if the authentication lacks the required scopes to see drafts [1]. If you are creating a draft, ensure the process completes successfully before accessing it [5].

Citations:


Fail the release gate when release lookup fails for reasons other than a missing release.

Lines 40-45 write ready=false for every gh release view failure. Authentication failures, rate limits, network failures, and GitHub API errors can also return non-zero status, so the build and Pages deploy are skipped even though the advertised release should be ready. Treat only a missing release as ready=false; fail the gate for other lookup errors. Use structured release output such as --json publishedAt or --jq .publishedAt != null when querying availability.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pages.yml around lines 38 - 45, Update the release lookup
in the Pages workflow so only a confirmed missing or unpublished release writes
ready=false; use structured gh release view output such as publishedAt to
determine availability. Capture lookup failures, distinguish the missing-release
status from authentication, rate-limit, network, and API errors, and fail the
release gate for all other errors.

Comment on lines +526 to +536
pages:
if: ${{ github.ref_type == 'tag' && needs.verify.result == 'success' && needs.verify-windows.result == 'success' }}
needs: [verify, verify-windows]
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- name: Dispatch Pages after public release verification
env:
GH_TOKEN: ${{ github.token }}
run: gh workflow run pages.yml --repo "${{ github.repository }}" --ref main

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Files matching release/pages/shared:"
git ls-files | rg '(^|/)(release\.yml|pages\.ya?ml|shared\.ts)$|site/src/shared\.ts|pages' || true

echo
echo "Release workflow relevant dispatch:"
sed -n '510,545p' .github/workflows/release.yml 2>/dev/null || true

echo
echo "Pages workflows:"
fd -t f '(^pages.*\.ya?ml$\|release\.ya?ml$)' .github/workflows -x sh -c 'echo "--- $1"; sed -n "1,220p" "$1"' sh {}

echo
echo "site/src/shared.ts if present:"
if [ -f site/src/shared.ts ]; then
  sed -n '1,220p' site/src/shared.ts
fi

echo
echo "Search releaseVersion/advertisement/version inputs:"
rg -n "releaseVersion|release_version|ref_name|workflow_dispatch|workflow_dispatch:" .github site || true

Repository: echoVic/orca-agent

Length of output: 9562


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Pages workflow:"
cat -n .github/workflows/pages.yml

echo
echo "Relevant release workflow sections:"
sed -n '230,275p' .github/workflows/release.yml | cat -n
sed -n '330,375p' .github/workflows/release.yml | cat -n
sed -n '530,540p' .github/workflows/release.yml | cat -n

echo
echo "Workflow run contract tests:"
cat -n tests/pages_workflow_contract.test.mjs

echo
echo "Static invariant checks:"
python3 - <<'PY'
from pathlib import Path
release = Path(".github/workflows/release.yml").read_text()
pages = Path(".github/workflows/pages.yml").read_text()
shared = Path("site/src/shared.ts").read_text()

dispatch = "gh workflow run pages.yml --repo \"${{ github.repository }}\" --ref main"
page_input_defs = pages.splitlines()[:80]
has_release_input = any("release_version" in line or "release-version" in line or "required" in line for line in page_input_defs)
extracts_shared = "sed -nE 's/^export const releaseVersion = \"([^\"]+)\";$/\\1/p' site/src/shared.ts" in pages
print("release workflow contains dispatch without inputs:", dispatch in release)
print("pages workflow exposes release_version input:", has_release_input)
print("pages workflow compares release input with site/src/shared.ts:", "compare" in pages.lower() and "release" in pages.lower() and "releaseVersion" in pages)
print("pages workflow extracts site/src/shared.ts releaseVersion:", extracts_shared)
PY

Repository: echoVic/orca-agent

Length of output: 8803


Pass the verified release tag to the Pages workflow gate.

The release workflow dispatches pages.yml --ref main, but pages.yml then reads the advertised version from the checked-out main tree with sed ... site/src/shared.ts. This means a different tag or a main change can determine the deployment instead of the release that just passed verification. Pass ${{ github.ref_name }} into pages.yml as a workflow_dispatch input and require that input to match site/src/shared.ts before building or deploying.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 526 - 536, Update the pages
workflow dispatch in the release job to pass github.ref_name as a
workflow_dispatch input, and update the pages workflow gate to require that
input matches the version read from site/src/shared.ts before building or
deploying. Use the dispatched tag rather than the main branch ref to ensure
Pages deploys the verified release.

Comment on lines +1262 to +1273
let mut child_execution_policy = execution_policy.clone();
if let Some(budget_cap) = permit.budget_cap() {
child_execution_policy.max_agent_tokens = Some(budget_cap);
}
match self.run_child_agent_call(
&call,
workflow_ipc,
&child_execution_policy,
workflow_cancel,
) {
Ok(child_output) => {
permit.settle_usage(child_output.usage.total_tokens())?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Enforce the reservation in the child runtime.

Lines 1262-1265 set max_agent_tokens to the reservation. run_child_agent_call only checks this value after the child returns at Line 1603. A child can consume more than its reservation before Lines 1273 and 1360 settle the usage. The run can then exceed its configured token budget.

Pass the reservation to the child execution limit, not only to post-execution validation. Add a test where a child reports usage above its reservation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/orca-runtime/src/workflow/runner.rs` around lines 1262 - 1273, Update
the child execution path around run_child_agent_call so the permit’s budget_cap
is enforced by the child runtime during execution, not only validated after the
call returns. Pass the reservation through the child execution-limit mechanism
while preserving the existing settle_usage handling, and add coverage for a
child reporting usage above its reservation.

@echoVic
echoVic merged commit 96a9976 into main Aug 7, 2026
4 checks passed
@echoVic
echoVic deleted the codex/orca-0.3.8-release branch August 7, 2026 00:22
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