Skip to content

[3363 by Claude Opus 5.5] Fix the 0.9.0 release validation gate failure on main (baseline 43bd2d72d2e69337df42ec6b6abec7113d9229ed). - #3365

Merged
integry merged 1 commit into
mainfrom
3363/claude-opus-5-5-fix-the-0-9-0-release-val-20261028-1640-dgt
Oct 28, 2026
Merged

integry merged 1 commit into
mainfrom
3363/claude-opus-5-5-fix-the-0-9-0-release-val-20261028-1640-dgt

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3363

Branch: 3363/claude-opus-5-5-fix-the-0-9-0-release-val-20261028-1640-dgt
Commits: ✅ Changes committed (447cc53)


AI Processing Completed

Execution Details:

Summary:
The release-gate fixes are in place, but the real-Docker checks couldn't run here: this container has no Docker. Rebuilding app/launcher and rerunning the SQLite smoke as a normal user against rootful Docker still has to happen on the validation host. Upstream main is still at 43bd2d72d, so none of this was already fixed. Disk pressure didn't block this task.

1. Zero-warning lint (usageTrackingWrapper.ts)

  • executeWithUsageTracking now takes (agent, executeFn, options), where options is { timeoutMs?, alias?, skipUsageTracking? } (new exported UsageTrackingOptions type).
  • Defaults are unchanged: alias falls back to the agent and skip defaults to false. Usage accounting, cancellation and return values behave as before.
  • I updated the 8 agent call sites that passed extra arguments, plus the test calls. Two test files had silently broken: root tsc doesn't check test/, so their old-style calls showed up as assertion failures.
  • npm run lint --workspaces --if-present -- --max-warnings 0 passes, as do root lint and the root and core typechecks. All 31 affected agent/usage test files pass.

2. Cleanup of root-owned data in both smoke scripts

  • smoke-test-sqlite-startup.sh and smoke-test-images.sh now create a private mktemp root. They remove it with the existing remove_smoke_root helper, which the preview and desktop smokes already use. It checks the exact directory, its owner and mode 0700, then runs a cleanup container with no network and minimal privileges that mounts only that root.
  • I widened the helper's allowed name patterns to cover the two new directory names.
  • Cleanup failures are now reported and turn a passing run into a failure. The image smoke used to hide them (2>/dev/null || true).
  • One behaviour change: the image smoke's data directory is now a fresh temporary directory per run under RUNNER_TEMP/TMPDIR, not the fixed /tmp/${STACK}-data. Leftover containers and networks from earlier runs are still cleaned up.

3. False negative in the failure check

  • The docker logs … | grep -Fq check is replaced by container_logs_contain (new scripts/lib/smoke-container-logs.sh), which reads the complete log before searching it.
  • The check that no database service starts after a migration failure is kept.

4. Migration error messages (launcher)

  • The migration container now gets TINI_SUBREAPER=1. Both tini processes still reap child processes, and the inner one stops printing the "not running as PID 1" warning.
  • The error message now picks the actual Error: line, skipping tini notices and Node's source-location line. It is one line, cut to 500 characters, and raw output is never included. Sync and async startup share this code.
  • I added a CHANGELOG "Fixed" entry for this.

New tests

  • test/imageSmokeCleanup.test.mjs runs both real scripts against a fake Docker that leaves a protected data/web-push directory. It checks the root is removed, the original failure exit code is kept, the cleanup container's exact arguments, and that a failed cleanup is reported.
  • The same file includes a control proving the old pipe really fails under pipefail with 4 MiB of log after the match, and that the new helper finds the match.
  • test/orchestratorMigrationPhase.test.mjs has new sync and async cases for the error-message selection and length limit.
  • The desktop helper's boundary tests cover the new directory names, and I added near-miss names it must still refuse.
  • The new tests fail against the baseline scripts and launcher, and pass now. The 18 affected test files, the desktop smoke test (7/7) and releaseValidation all pass.

Not tested here

  • The test that deletes real root-owned data with rootful Docker is skipped unless PREVIEW_SMOKE_CLEANUP_IMAGE is set, so it didn't run here.

I left runner routing, storage thresholds, worktrees and web-push directory permissions unchanged. There are no visual changes, so no preview.

Detailed Logs:

  • Conversation: 214 messages
  • Session: 069ecc7e-9a6f-443a-bf07-a8b136ea0373

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3363-2026-10-28T17-00-09-618Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3363-2026-10-28T17-00-09-618Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: The release-gate fixes are in place, but the real-Docker checks couldn't run here: this container has no Docker. Rebuilding app/launcher and rerunning the SQLite smoke as a normal user against rootful...


This PR was created automatically by ProPR after processing issue #3363.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!

…n't run here: this container has no Docker. Rebuilding app/launcher and rerunning the SQLite smoke as a normal user against rootful Docker still has to happen on the validation host. Upstream `main` is still at `43bd2d72d`, so none of this was already fixed. Disk pressure didn't block this task.

1. Zero-warning lint (`usageTrackingWrapper.ts`)
- `executeWithUsageTracking` now takes `(agent, executeFn, options)`, where `options` is `{ timeoutMs?, alias?, skipUsageTracking? }` (new exported `UsageTrackingOptions` type).
- Defaults are unchanged: alias falls back to the agent and skip defaults to false. Usage accounting, cancellation and return values behave as before.
- I updated the 8 agent call sites that passed extra arguments, plus the test calls. Two test files had silently broken: root `tsc` doesn't check `test/`, so their old-style calls showed up as assertion failures.
- `npm run lint --workspaces --if-present -- --max-warnings 0` passes, as do root lint and the root and core typechecks. All 31 affected agent/usage test files pass.

2. Cleanup of root-owned data in both smoke scripts
- `smoke-test-sqlite-startup.sh` and `smoke-test-images.sh` now create a private `mktemp` root. They remove it with the existing `remove_smoke_root` helper, which the preview and desktop smokes already use. It checks the exact directory, its owner and mode `0700`, then runs a cleanup container with no network and minimal privileges that mounts only that root.
- I widened the helper's allowed name patterns to cover the two new directory names.
- Cleanup failures are now reported and turn a passing run into a failure. The image smoke used to hide them (`2>/dev/null || true`).
- One behaviour change: the image smoke's data directory is now a fresh temporary directory per run under `RUNNER_TEMP`/`TMPDIR`, not the fixed `/tmp/${STACK}-data`. Leftover containers and networks from earlier runs are still cleaned up.

3. False negative in the failure check
- The `docker logs … | grep -Fq` check is replaced by `container_logs_contain` (new `scripts/lib/smoke-container-logs.sh`), which reads the complete log before searching it.
- The check that no database service starts after a migration failure is kept.

4. Migration error messages (launcher)
- The migration container now gets `TINI_SUBREAPER=1`. Both tini processes still reap child processes, and the inner one stops printing the "not running as PID 1" warning.
- The error message now picks the actual `Error:` line, skipping tini notices and Node's source-location line. It is one line, cut to 500 characters, and raw output is never included. Sync and async startup share this code.
- I added a CHANGELOG "Fixed" entry for this.

New tests
- `test/imageSmokeCleanup.test.mjs` runs both real scripts against a fake Docker that leaves a protected `data/web-push` directory. It checks the root is removed, the original failure exit code is kept, the cleanup container's exact arguments, and that a failed cleanup is reported.
- The same file includes a control proving the old pipe really fails under `pipefail` with 4 MiB of log after the match, and that the new helper finds the match.
- `test/orchestratorMigrationPhase.test.mjs` has new sync and async cases for the error-message selection and length limit.
- The desktop helper's boundary tests cover the new directory names, and I added near-miss names it must still refuse.
- The new tests fail against the baseline scripts and launcher, and pass now. The 18 affected test files, the desktop smoke test (7/7) and `releaseValidation` all pass.

Not tested here
- The test that deletes real root-owned data with rootful Docker is skipped unless `PREVIEW_SMOKE_CLEANUP_IMAGE` is set, so it didn't run here.

I left runner routing, storage thresholds, worktrees and web-push directory permissions unchanged. There are no visual changes, so no preview.
@integry

integry commented Oct 28, 2026

Copy link
Copy Markdown
Owner

/review fable astra

@propr-dev

propr-dev Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 2 reviews:

View Task Details

@propr-dev

propr-dev Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — fable

Overall Evaluation

The PR fixes the 0.9.0 release-gate lint failure by replacing the five positional parameters of executeWithUsageTracking with a single UsageTrackingOptions object, and updates every agent call site and the two root tests that passed positional arguments. Alongside the objective it carries two related release-validation fixes: the launcher's migration-failure message now reports the actual Node error (skipping the nested tini "not running as PID 1" notice, which is also silenced via TINI_SUBREAPER=1), and the image/SQLite smoke harnesses now reuse the bounded remove_smoke_root helper so root-owned 0700 entries left by containers are removed instead of leaking, plus a container_logs_contain helper that avoids the docker logs | grep -q SIGPIPE false negative under pipefail.

I traced the options refactor through all five agents and claudeService.ts (no-options caller) and found the defaults preserved exactly: { alias: undefined } and { skipUsageTracking: undefined } destructure to agent and false just as the old default parameters did, timeoutMs stays undefined where callers previously passed undefined, and the analysis paths keep ANALYSIS_AGENT_TANK_TIMEOUT_MS. The migration-detail parser was checked against Node's uncaught-error layout and the 500-char bound; both the sync and async phases are covered by the new test. The smoke harness changes are exercised end to end against a fake engine, and the helper's name-shape regex is extended in a way that keeps the previous two shapes accepted. All current-head checks pass. The PR is ready to merge within scope; the only caveat is that neither smoke harness has been run against a real Docker daemon on this head (the author states this explicitly).

✅ Behavior-preserving options refactor — packages/core/src/agents/impl/utils/usageTrackingWrapper.ts:356 destructures { timeoutMs, alias = agent, skipUsageTracking = false }, so every changed call site (e.g. CodexAgent.ts:99 passing only alias, ClaudeAgent.ts:298 passing all three) yields the same probe timeout, alias and skip semantics as before; the updated usageTrackingBundledDelta.test.ts health-probe case still asserts zero refreshes.

✅ Migration error surfaced instead of init noise — docker/launcher/orchestrator.mjs:1409-1416 filters tini notices and prefers the first Error:-shaped line, and the new orchestratorMigrationPhase.test.mjs fixture proves a trailing SESSION_SECRET= line and the Node source-location/caret lines are not chosen, for both sync and async phases, with the 500-char truncation verified to the character.

✅ Smoke cleanup regressions drive the real scripts — test/imageSmokeCleanup.test.mjs runs scripts/smoke-test-sqlite-startup.sh and scripts/smoke-test-images.sh unmodified against a fake engine that plants a 0000-mode web-push child, asserts the private root is gone, the cleanup container is network-less/cap-dropped with a single bind mount, the original step failure is preserved, and a cleanup failure is reported rather than masked.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Continue removing stack resources after one failure

scripts/smoke-test-images.sh:78-83 now does docker rm -f "$resource" >/dev/null || return 1, so the first container that fails to remove aborts the loop and leaves the remaining containers and the network behind, even though the subsequent remove_smoke_root still runs. The preview-runtime smoke (scripts/smoke-test-preview-runtime-images.sh:50-57) uses the || failed=1 aggregate pattern instead. Adopting the same pattern here would make a partial-cleanup failure remove everything it can before reporting. Optional: the failure is still surfaced and the run is marked failed either way.

S2: 🟢 Run both smokes against a real rootful daemon before release

The author notes the real-Docker checks could not run in the implementation container, and none of the current-head checks exercise smoke-test-images.sh or smoke-test-sqlite-startup.sh against an actual engine. Two behavior changes are only validated through the fake engine: the image smoke's data root moved from a 0755 /tmp/${STACK}-data to a 0700 mktemp root under RUNNER_TEMP/TMPDIR, and cleanup failures now fail the run. The preview-runtime smoke already works with the same 0700 layout, so this is low risk, but confirming on the validation host that no non-root container (e.g. the UI image) bind-mounts anything under the new root, and that no workflow step still references /tmp/${STACK}-data for log/artifact collection, would close the gap the summary acknowledges.

S3: 🟢 Fallback when the migration error is not Error:-prefixed

docker/launcher/orchestrator.mjs:1401 matches ^[A-Za-z]*Error\b, which covers Node's standard uncaught-error report. Errors printed via util.inspect without a stack ([Error: ...]), thrown non-Error values, or JSON logger output fall back to the first non-tini line, which for an uncaught throw is the file:///...:12 source-location line the change set out to avoid. A small extension (also accepting ^\[?[A-Za-z]*Error\b or skipping the location/caret/blank trio) would make the fallback more robust; not required since the common Knex failure path is handled and tested.

S4: 🟢 Note the smoke-harness changes in the changelog

CHANGELOG.md gains an entry for the migration-failure message but nothing for the SQLite/image smoke cleanup changes or the container_logs_contain helper. These are release-validation tooling rather than user-facing behavior, so it is a judgment call, but a short "Internal"/"CI" line would help the next person diagnosing a smoke failure understand why the data root moved out of /tmp.

Score

The lint-gate objective is met with a behavior-preserving refactor, the adjacent migration-message and smoke-cleanup fixes are correct and well covered by new tests, and every current-head check passes; the only reservation is the author-acknowledged absence of a real-Docker run of the modified smokes.

Score: 8/10


🤖 Review Details

  • Model: Claude Fable 5.1
  • Time: 3m 34s
  • Tokens: 94,496 (80,797 in / 13,699 out)
  • Cost: $1.69

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S1 S2 S3 S4

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — astra

Overall Evaluation

Ready to merge within the supplied scope. The options refactor addresses the lint failure while preserving the shown timeout, alias, and skip-tracking values. The smoke-harness changes reuse bounded cleanup and improve failure diagnostics.

✅ Preserved tracking semantics — Options retain the original defaults, and the changed callers preserve their previous arguments without changing execution callbacks.

✅ Bounded cleanup — Both smoke harnesses adopt the existing ownership, directory identity, and path checks. Added tests exercise protected-directory cleanup and refusal boundaries.

✅ Reliable log assertions — Capturing logs before matching removes the early-reader-exit failure under pipefail; regression tests cover large output and unreadable logs.

The authoritative checks report 38 passed and no failures or pending checks. This review used static analysis only; no commands were run. The supplied issue description is truncated, so requirements beyond its visible portion could not be assessed.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S5: 🟢 Clarify the diagnostic length limit

CHANGELOG.md promises a message of at most 500 characters, but boundedDetail in docker/launcher/orchestrator.mjs retains 500 characters and appends an ellipsis; migrationFailure then adds its prefix. Clarify that the detail is truncated after 500 characters, or adjust the implementation and assertion to match the documented total. This is a minor documentation discrepancy without a demonstrated operational consequence.

S6: 🟢 Record real Docker validation

The added fake-engine tests provide useful coverage, but do not establish actual container ownership and nested-init behavior. Recording a smoke run against rebuilt images, as an ordinary user with rootful Docker, would strengthen release evidence. This is an optional validation follow-up, not evidence of a current failing check or code blocker.

Score

The changes preserve the visible usage-tracking contract and add focused regression coverage for the smoke fixes. Current checks are green, and static review found no merge-blocking regression.

Score: 9/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 34s
  • Tokens: 57,172 (56,574 in / 598 out)
  • Cost: $0.49

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S5 S6

🤖 Review by ProPR

@integry
integry merged commit de0c884 into main Oct 28, 2026
60 checks passed
@integry
integry deleted the 3363/claude-opus-5-5-fix-the-0-9-0-release-val-20261028-1640-dgt branch October 28, 2026 20:50
propr-dev Bot pushed a commit that referenced this pull request Oct 29, 2026
…erify` and all 156 affected test files pass. I did not merge, tag, publish or deploy.

I fixed both issues on this PR. Lint, typecheck, `release:verify` and all 156 affected test files pass. I did not merge, tag, publish or deploy.

## 1. Retired Gemini 3.6/3.7 Flash now run on Gemini 3.8 Flash

This works the same way as the Gemini 3.1 Pro → Argon change:

- **Saved selections:** the 3.6/3.7 Flash IDs and their low/medium/high variants now launch on 3.8 Flash. A selection with no effort of its own gets medium; a saved effort is kept and, if 3.8 Flash didn't support it, it would drop to the nearest supported level. The aliases (`flash36`/`flash37`, `antigravity-flash37-high`, …) and the `llm-antigravity-flash36`/`flash37` labels select 3.8 Flash too.
- **CLI ID launched:** `toAntigravityCliModelId` now only launches current catalog models. Every old selection launches `gemini-3.8-flash-<effort>`, for example `antigravity-gemini-3.7-flash-high` → `gemini-3.8-flash-high` and `antigravity-gemini-3.6-flash` → `gemini-3.8-flash-medium`.
- **On startup:** agents that list either model switch to 3.8 Flash, keeping any saved reasoning setting unless 3.8 Flash already has its own. 3.8 Flash appears once in the list.
- **Other saved references:** agent run triggers, plan labels, queued epic selections, task-submission defaults, native goals, the MCP model choices and the summarization model setting now accept old IDs and resolve them to 3.8 Flash. Before, each of these required an exact match in the agent's model list and failed. A shared helper, `agentSupportsSavedModel`, does this check.
- **Selection and fan-out:** the models are already gone from the catalog, and the startup step removes them from `supportedModels`. Multi-model and matrix runs are built from that list, so neither can pick them.
- **Old run reports:** a run that reports `Gemini 3.7 Flash (Medium)` or `gemini-3.6-flash-low` still matches its request, but only at the same effort.

The three old tests that asserted the retired models still launch now assert 3.8 Flash and the exact CLI ID. I added a **Retired models** bullet to the 0.9.0 changelog.

**Other CLIs pinned in this release:** the installed CLIs match the pins (agy 1.4.0, claude 2.1.293, codex 0.160.0, vibe 2.25.8, opencode 1.18.31).
- `opencode models` lists exactly the 7 catalog models.
- The live Antigravity list in your output matches the catalog exactly once 3.6/3.7 are removed.
- No other agent type has retained or runtime-only models; its remaining old IDs already route to current models.
- `agy models` needs sign-in here. The binary still contains the 3.6/3.7 names, so your live E2E output is what shows they're no longer served.
- I couldn't check which models the Claude and Codex servers still serve without signing in.

## 2. Failure reasons name the real error

A new shared helper, `agentFailureLine`, skips the entrypoint preamble, the config-directory listing and the launch-command line. It returns the first error line, or the first remaining line if there is none, as one line of at most 500 characters. The launcher fix in #3365 was the model.

It now feeds the failure reason for issue tasks, PR follow-ups, native goals and agent runs, plus the issue/PR failure comments, so every agent type is covered. Secrets are now removed from every stored task-state reason and last-error message.

The full output is still kept in the logs, and the automatic retry check still sees it. With your exact Antigravity output, the reason is now `error: invalid model selection (--model "gemini-3.7-flash-medium" …) …`; there are regression tests for that and for the secret redaction.

## Validation
- `npm run lint --workspaces --if-present -- --max-warnings 0` and root `eslint src/ --max-warnings 0` pass.
- Typechecks pass for root, api and UI; shared and core build cleanly.
- 156 affected test files pass. `managedDiagnostics` failed in my first batch only because I had set `LOG_LEVEL=silent`, which hides the log output it checks; it passes without that setting.
- `EXPECTED_VERSION=0.9.0 RELEASE_TAG=v0.9.0 RELEASE_CANDIDATE=true npm run release:verify` passes.

There's no visual change, so I made no preview.

PR: #3368
Comment by: @integry (ID: 6484354107)
Model: Claude Opus 5.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix the 0.9.0 release validation gate failure on main (baseline 43bd2d72d2e69337df42ec6b6abec7113d9229ed).

1 participant