Skip to content

perf(build): restore release size limits and repair performance gates - #315

Merged
lg2m merged 17 commits into
mainfrom
fix/eng-834-performance-gates
Oct 15, 2026
Merged

lg2m merged 17 commits into
mainfrom
fix/eng-834-performance-gates

Conversation

@lg2m

@lg2m lg2m commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

QQ’s release binaries exceed the existing 48 MB default and 41 MB minimal limits. This change restores those limits while retaining all features and dependencies, and repairs the verification of release performance and retry recovery. Tracks ENG-834.

  • Use full release LTO and s optimization for qq, xtask, qq-auth and qq-config; runtime/provider and other libraries retain level 3. Strip executable symbols. ADR-0062 supersedes ADR-0010’s compiler choices while preserving its ceilings. Main’s fast development profiles remain intact.
  • Match the retry budget to ADR-0040’s existing five-retry policy. Retain the average metric, but require exactly six entries in every always-faulting run. Regression-first commits reproduce rare extra sends and lost attempts hidden by aggregate guards.
  • Fixture and budget version 5 invalidate earlier aggregate-only retry receipts. Regression-first 77a42b53 reproduces stale report acceptance; 3dc36557 repairs it. The real CLI rejects an actual historical version-4 hosted report against current budgets.
  • Compare production baseline 3b763ea1 and candidate using one immutable H0 fixture; retain original/effective source hashes and verify candidate/control binary identity. The guard permits only fixture 4 → 5 and the documented retry-budget correction. Turn diagnostics retain common fixture 9868038c and each arm’s final optimization setting.
  • Stream compiler output and workload phases outside sample timing; preserve logs and receipts on output-sink failure.
  • Repair two inherited delegation fixtures: freeze the deadline until summary/hook/store readiness, then advance it explicitly. Use fewer shell turns with dense measured token usage while retaining actual compaction, accounting, ordering and usability assertions. Remove one fixed sleep (ceiling 77 → 76). The added real-time setup watchdog was removed following review; existing nextest process timeouts remain.

Verification at published head 3dc36557:

  • The enabled pre-push hook passed all seven gates and published this clean head: 2,467/2,467 workspace tests, 14 existing skips; 211/211 minimal-provider tests, no skips. No hook bypass.
  • Real-binary smoke 6/6 passes locally in 1.57s and in hosted CI in 0.28s. Current-head CI passes all seven full-workspace-selected gates in 146.1s, plus Windows, wasm and website checks. The changed delegation cases also pass 2/2 under minimal-core.
  • Focused retry/compatibility checks 4/4, delegation cases 2/2, overlay guard 6/6, streaming failure checks 4/4, and actionlint pass. Independent review approves both latest fixes.
  • All seven Codex threads have fixing-commit/evidence replies and are resolved. Fresh Codex review completed at this head with no major issues.
  • The pre-commit full gate also passed in 212.9s. One standalone xtask invocation hit socket EPERM; the full gate subsequently passed that test without source changes or skips. Reports are retained.
cargo xtask check

Head 3dc365578669 vs origin/main; 16 changed file(s); scope: full workspace.

Gate Result Tests Time Command
fmt pass 1.4s cargo fmt --all -- --check
lint pass 0.9s cargo xtask lint
clippy pass 2.9s cargo clippy --color never --workspace --all-targets --all-features -- -D warnings
test pass 2467/2467 passed, 14 skipped 272.7s cargo nextest run --color never --profile quick --workspace
doctest pass 1.7s cargo test --color never --workspace --doc
minimal-clippy pass 0.1s cargo clippy --color never -p qq-provider --no-default-features --features test-support --all-targets -- -D warnings
minimal-test pass 211/211 passed, 0 skipped 1.5s cargo nextest run --color never --profile quick -p qq-provider --no-default-features --features test-support

All gates passed in 281.2s.

Performance qualification failed; do not merge. Current-head CI run 38695949630 has green correctness, smoke, Windows, wasm, website and turn-recording jobs; Codex review is clear. H0’s size and correctness checks pass, but its performance comparisons fail.

Current-head H0 artifact 11956370731, SHA-256 ffd67039a389f056cecb07d8175f2f47b5e1aee773f656c31a7aae31973900ec, is downloaded and independently audited: all 231 metric summaries, pinned production/fixture identities, version-5 budget bytes and candidate/control binary identities verify. All three recordings exit successfully and pass 25/25 correctness checks each, including exactly six entries in all 20 faulting runs.

Sizes are 44,849,176 / 48,000,000 default and 40,778,584 / 41,000,000 minimal bytes. These current-head measurements pass the unchanged ceilings.

H0 reports 18 A/B and 20 A/A failures involving noise, latency and throughput; rerunning the comparator over the saved reports reproduces them exactly. Host I/O pressure reaches 25.62, above the documented threshold of 20. Unchanged-binary direct-completion p95 shifts 38.7 → 92.5 ms while shell p95 shifts 214 → 7.8 ms. Baseline HTTP acknowledgment already exceeds its absolute ceiling. Ten-session throughput medians 61.008 / 47.228 / 41.064 runs/s remain unresolved; this run cannot establish that every observed regression is noise or attribute one to the change.

Independent review agrees that the artifact does not justify a source fix or a waiver. The selected s profile’s restart/replay medians are 3.123 / 3.218 / 3.258 ms, without the earlier repeated 45–64% z regression. The required next step is unchanged H0 A/B plus A/A on an exclusive quiet host, with focused throughput profiling if the decrease persists. The local host is also above the pressure threshold, and the repository has no registered self-hosted runners. A quiet-host resource has been requested. No blind shared-host retry, budget change or failure waiver.

Current-head 3dc36557 turn artifact 11954752079, SHA-256 396458c093ac3ddf52addef766f7520cc086a865693a8feab1f00409c116b153, verifies all 120 logs, source manifests against immutable fixture commit bytes, binary identities and recomputed summaries. I/O pressure max 13.02, 0/240 snapshots above 20. At 1,000 turns, A/B median −0.552%, p95 −1.499%; same-binary median +0.590%, p95 +3.532%. Across 10/100/1,000 turns the largest A/B p95 increase is +0.483%. This diagnostic shows no material slowdown; it is not an H0 metric registration or a substitute for the pending H0 gate.

Full LTO increases release linking time. No protocol, store schema, feature set or dependency change.

lg2m added 3 commits October 14, 2026 16:17
ENG-834: retry_performance_budget_accepts_turn_recovery_but_rejects_an_extra_send fails because the approved six-send retry allowance exceeds the old 1050-milli budget. Record merged AB slices and the user-authorized performance follow-up.
ENG-834: use full LTO and size-oriented final executable optimization; retain level 3 dependencies. Align H0 and turn drivers with the shipped profile, correct the ADR-0040 retry ceiling, and preserve every other size and speed budget. Runtime performance qualification remains required.
ENG-834: normal compiler invocation retained symbol tables despite the inherited release setting. Make the setting explicit for qq and xtask; verify the normal build artifact against unchanged size ceilings.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T07:06:37.809401Z 3dc3655 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 chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f05340b294

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

Comment thread Cargo.toml Resolved
Comment thread benchmarks/perf/README.md Resolved
Comment thread .github/workflows/ci.yml Resolved
@lg2m

lg2m commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 42a06cc608

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

Comment thread benchmarks/perf/budgets-v1.json Resolved
@lg2m

lg2m commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 574deb3917

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

@lg2m

lg2m commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 25dff5af8d

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

@lg2m

lg2m commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2f7c5af221

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

Comment thread xtask/src/perf.rs Resolved
@lg2m

lg2m commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@lg2m lg2m added the ci:full label Oct 15, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 645e2fdbd8

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

Comment thread xtask/src/perf.rs Resolved
@lg2m

lg2m commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 3dc3655786

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

@lg2m
lg2m merged commit 2133299 into main Oct 15, 2026
7 of 8 checks passed
@lg2m
lg2m deleted the fix/eng-834-performance-gates branch October 15, 2026 17:02
@lg2m lg2m mentioned this pull request Oct 15, 2026
Facilier added a commit that referenced this pull request Oct 20, 2026
Brings in main via #313's branch and adapts the desktop app:
- ADR renumbered 0062 -> 0064: main accepted a different ADR-0062 (full
  LTO, #315) and ADR-0063 while this PR was open. The file, its index row,
  the root ledger reservation (next free 0065) and the desktop references
  move to 0064; a ledger entry records the renumbering.
- The desktop core handles main's new StateEffect::CheckInterruptionChanged
  like the TUI: a warning while an interrupted goal completion check holds
  the workspace, and a notice when it is acknowledged. Test snapshots gain
  main's new `goal` and `check_interruption` fields.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant