Skip to content

perf(cron): avoid roster allocation in availability checks - #182002

Closed
steipete wants to merge 7 commits into
mainfrom
steipete/perf-buf4-cron-availability-20261023
Closed

steipete wants to merge 7 commits into
mainfrom
steipete/perf-buf4-cron-availability-20261023

Conversation

@steipete

@steipete steipete commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Hold for performance: do not merge this candidate. Owner allocation falls sharply and all availability boundaries remain intact, but two valid serial whole-turn comparisons show adverse total GC and maximum pauses. A concurrent swapped-slot comparison was unavailable after the bounded 15-minute wait. Final-head CI completed red on four UI E2E jobs; their inherited status is unverified. The lane owner will not merge.

What Problem This Solves

Scheduled operator continuations repeatedly rebuild the full agent roster and resolve the state database path while checking cron owner availability. Each assertion asks about one agent, but temporary allocation grows with the configured fleet.

Change and User Impact

Both cron adapters use a roster-owned membership lookup. Canonical keyed entries use a direct own/enumerable lookup; legacy lists, raw ID normalization, malformed roster handling and absent-versus-empty roster behavior remain supported. A state-bound admission reader reads live refusal publications and the current preparation scope. Canonical agent IDs return unchanged before normalization, avoiding repeated lowercasing. The strict normalization API is unchanged.

Availability assertions remain at every existing boundary: agent removal, deletion blocking, refusal changes and expired preparation scopes still revoke work at the next check. No cache, retained roster, configuration, schema or migration changes.

Production delta is +41 lines: +34 for direct membership with raw-roster compatibility and shared roster selection, +7 for the fixed-state live reader, +4 for canonical normalization, +1 existing-barrel export, and −5 in cron adapters. Each addition replaces repeated work; no unrelated deletion offsets the count. This removes work rather than retaining prepared objects, but it is not a net-LOC deletion.

Measurement

Five samples per side for each of six cells, 20,000 checks per sample (100,000 per side/cell), alternating baseline/candidate process order. Original baseline source: f8d9d253e1c4bf4433d32f9827d5f078fa377112; final owner implementation is unchanged by the latest-main rebase. Linux Node 26.12.1; 4 KiB inspector sampling includes collected objects. Timing and GC use a separate unsampled window. All answers matched. Candidate estimates are at the sampling floor, not proof of exactly zero allocation.

Roster Agents Baseline B/call Candidate B/call Baseline ns/call Candidate ns/call Baseline promoted B /20k Candidate promoted B /20k Baseline GC count (sum5) Candidate GC count
entries 10 2291.65 1.035 1454.9 84.3 0.0 0.0 5 0
entries 100 21329.88 0.133 11057.9 85.2 1987.2 0.0 60 0
entries 500 100319.15 0.207 58859.1 68.0 561.6 0.0 300 0
list 10 2729.02 0.000 1169.7 314.9 0.0 0.0 5 0
list 100 24619.44 0.000 9028.0 2190.5 192.0 0.0 70 0
list 500 116474.90 0.124 47469.6 11300.8 88.0 0.0 345 0

The source-instrumented authenticated cron continuation also completed five turns per side, with one restored operator source, three tool completions and zero resets per turn. Mean availability calls were 38,558.6 → 38,549.4 (−0.024%). These synthetic workload counts are nested assertions, not production calls/turn or distinct permission decisions. No check was moved or removed.

Whole-isolate sampling uses a separate run without authority-count source instrumentation with the same synthetic flow and includes ordinary turn work. The first sequential five-turn comparison is recorded below. A reverse-order candidate→baseline repeat used fresh identical fixtures, the same six pinned owner sources and a 210-second post-launch capture boundary. Both comparisons are serial context, not concurrent swapped-slot pairs. No valid observation was discarded.

Metric (5 turns/side) Baseline mean Candidate mean Change
Sampled allocation 378.086 MB 343.088 MB -9.26% (-34.998 MB)
Promotion 29.223 MB 28.891 MB -1.13% (-0.332 MB)
Trace collection pause 37.719 ms 50.653 ms +34.29% (+12.934 ms)
Turn GC count baseline/candidate GC total ms baseline/candidate GC max ms baseline/candidate Event-loop p99 ms baseline/candidate (sample counts)
1 13/13 21.731/79.878 2.602/51.870 43.418/44.204 (n=193/203)
2 14/12 44.143/55.460 13.395/25.655 35.521/43.516 (n=200/239)
3 14/12 41.449/39.981 9.653/9.552 46.694/44.270 (n=197/217)
4 14/12 42.054/35.280 9.507/8.257 48.693/40.731 (n=231/213)
5 14/12 39.219/42.668 10.071/11.980 45.154/57.147 (n=192/234)

The first candidate maximum was 51.870 ms versus baseline 13.395 ms. The repeat maximum was 75.525 ms versus baseline 27.047 ms. Both exceed max(50 ms, 2 × baseline maximum). The shared guard did not interrupt these runs. All valid observations are retained.

The observer's total GC includes incremental events omitted from V8 collection-pause totals above. Use observer totals for the all-GC comparison:

Serial comparison (5 turns/side) Allocation MB/turn baseline → candidate Promotion MB/turn baseline → candidate Observer total GC ms/turn baseline → candidate
Initial baseline→candidate 378.086 → 343.088 (-34.998; -9.26%) 29.223 → 28.891 (-0.332; -1.13%) 38.561 → 52.936 (+14.375; +37.28%)
Repeat candidate→baseline 384.414 → 344.285 (-40.129; -10.44%) 27.374 → 28.460 (+1.086; +3.97%) 41.046 → 59.407 (+18.361; +44.73%)

Total GC is adverse in both serial sets (+37.28% and +44.73%). This is a hold recommendation, not a claim of a completed v4 concurrent gate or proven causal attribution. Promotion changes signs (−0.332 MB then +1.086 MB per turn), so it is inconclusive, not adverse, under v5.2. Event-loop p99 counts range from 189–366 per turn, below 1,000; GC tails also fall below the collection thresholds. No tail-percentile gate or production latency improvement is claimed.

The first outlier initially looked consistent with a startup memory-reducer phase shift, but the repeat also showed a large candidate major pause and the broader process trace did not establish equivalence. That explanation remains unproven. No further runs followed the repeat. The shared quiet-slot acquisition ended at 900 seconds without a grant; no paired workload started.

Reverse-order repeat: every turn and sample count
Turn Allocation MB baseline/candidate (heap samples) Promotion MB baseline/candidate Observer GC ms baseline/candidate (events) Trace GC ms baseline/candidate (collections) Max collection pause ms baseline/candidate Event-loop p99 ms baseline/candidate (samples)
1 399.982/361.616 (n=12124/10959) 22.092/19.499 66.503/135.875 (n=21/39) 62.516/128.390 (n=20/38) 27.047/75.525 39.387/44.040 (n=357/366)
2 384.164/340.931 (n=11642/10309) 15.259/31.725 23.849/39.421 (n=13/12) 23.140/38.590 (n=13/12) 2.582/8.463 41.452/63.504 (n=196/201)
3 379.922/333.757 (n=11501/10094) 33.233/30.459 38.498/38.794 (n=14/12) 37.672/37.859 (n=14/12) 8.620/9.180 40.632/45.023 (n=190/233)
4 380.378/343.186 (n=11513/10379) 33.123/29.536 38.515/37.467 (n=14/12) 37.653/36.602 (n=14/12) 8.556/8.446 36.143/43.516 (n=197/213)
5 377.624/341.935 (n=11435/10346) 33.161/31.081 37.863/45.479 (n=14/12) 36.938/44.546 (n=14/12) 9.289/12.832 42.238/58.327 (n=189/231)
Owner timing-window GC totals and maximum pauses, every process pair
Roster Agents Pair Base GC count Candidate GC count Base total GC ms Candidate total GC ms Base max ms Candidate max ms
entries 10 1 1 0 0.412 0.000 0.412 0.000
entries 10 2 1 0 0.477 0.000 0.477 0.000
entries 10 3 1 0 0.510 0.000 0.510 0.000
entries 10 4 1 0 1.388 0.000 1.388 0.000
entries 10 5 1 0 0.583 0.000 0.583 0.000
entries 100 1 12 0 1.185 0.000 0.185 0.000
entries 100 2 12 0 1.346 0.000 0.191 0.000
entries 100 3 12 0 1.185 0.000 0.180 0.000
entries 100 4 12 0 4.230 0.000 1.790 0.000
entries 100 5 12 0 1.546 0.000 0.215 0.000
entries 500 1 60 0 5.806 0.000 0.193 0.000
entries 500 2 60 0 7.670 0.000 0.260 0.000
entries 500 3 60 0 5.602 0.000 0.222 0.000
entries 500 4 60 0 35.410 0.000 16.208 0.000
entries 500 5 60 0 6.217 0.000 0.196 0.000
list 10 1 1 0 0.138 0.000 0.138 0.000
list 10 2 1 0 0.238 0.000 0.238 0.000
list 10 3 1 0 0.152 0.000 0.152 0.000
list 10 4 1 0 0.274 0.000 0.274 0.000
list 10 5 1 0 0.143 0.000 0.143 0.000
list 100 1 14 0 1.298 0.000 0.200 0.000
list 100 2 14 0 1.585 0.000 0.199 0.000
list 100 3 14 0 1.560 0.000 0.210 0.000
list 100 4 14 0 4.445 0.000 2.174 0.000
list 100 5 14 0 1.917 0.000 0.310 0.000
list 500 1 69 0 6.187 0.000 0.181 0.000
list 500 2 69 0 5.661 0.000 0.182 0.000
list 500 3 69 0 6.145 0.000 0.200 0.000
list 500 4 69 0 15.439 0.000 3.494 0.000
list 500 5 69 0 8.528 0.000 0.707 0.000

Reproduce the owner matrix with node --expose-gc --import ./scripts/tsx.mjs scripts/perf/cron-availability-measure.ts --mode baseline on original source and --mode candidate on the changed source. --rounds 1 supports external AB/BA ordering; --mode both is only a callback diagnostic because it shares the current normalizer. The script documents trace-GC flags. scripts/perf/README.md documents the authenticated --operator-access-policy --cron-operator-turn --sessions 1 --reset-every-rounds 0 flow; run --authority-counts separately from --allocations, using fresh identical fixtures. Check timing did not require a whole-Gateway A/B. The attempted extra controlled comparison could not obtain a slot; the reverse-order serial repeat retained the GC concern.

Proof

Focused local checks used Node 26.12.1 and one worker:

  • src/agents/agent-scope-config.test.ts: 35 passed; the no-projection regression fails on the original membership implementation.
  • src/state/agent-database-admission.test.ts: 14 passed, including live replacement/clearing, fixed state scope and escaped preparation revocation.
  • src/gateway/server-cron.test.ts: 85 passed.
  • src/cron/store/run-receipt-store.test.ts, src/cron/session-reaper.test.ts, src/cron/service/store.test.ts, src/cron/service.manual-delivery.test.ts: 50 passed.
  • packages/normalization-core/src/agent-id.test.ts: 19 passed.
  • test/scripts/gateway-bench-profile.test.ts: 14 passed.
  • test/scripts/eager-import-closure.test.ts, test/scripts/pr-wrapper-source-closure.test.ts: 22 passed; export-name collision guard passed.
  • Changed-file formatting/lint, targeted core typecheck using tsrs and git diff --check: passed. PR CI owns broad proof; no Testbox/Crabbox lease used.
  • src/gateway/server.chat-abort-settlement.test.ts, src/gateway/server-methods/progress-card-refresh.integration.test.ts, src/gateway/tools-invoke-authorization.test.ts: 38 tests passed under pinned Bun after the CI fixture repairs.
  • test/scripts/type-suppression-inventory.test.ts: 4 passed. Its single added entry explicitly records the deliberately malformed JavaScript roster fixture; production types and the runtime assertion stay strict.
  • Independent subagent review (autoreview route unavailable): no remaining actionable P0/P1/P2 findings. Autoreview preflight rejected a provider/config mismatch; operator configuration was not changed.

CI repairs are preserved, with no reruns to chase green:

  • Initial run 40037948466 exposed the scheduler fixture's missing canary-model allowlist entry; the synthetic model is now explicitly permitted. The local attempt was stopped when it requested a full package build; subsequent PR CI supplies its execution proof.
  • Run 40041422303 exposed a malformed-array fixture typing error. It is now an explicit negative-input test; run 40042657398 passed all five core test typecheck shards. Its expected-error inventory entry is recorded explicitly, rather than widening production types.
  • After rebasing onto upstream's asynchronous chat ACK change, progress-refresh and accepted-injection abort fixtures assumed ACK meant admission had already completed. Both now wait for real injection acceptance before exercising their original assertions. The progress test reproduced red locally before repair; all three affected fixture files passed under pinned Bun afterward.
  • A tools-invoke fixture saw an HTTP reset followed by a stale one-shot mock result in the next case. Mocks now reset between cases and fixture requests close their connections. The precise initial reset cause remains unproven; no production network behavior, retry or authorization assertion changed.

Final reviewed source head: 27d9c4e5399ef6e239bddcec045e3181db468f36. Final-head CI run 40043692738 completed with all changed Node test shards, core test typechecks, lint, and all three PostgreSQL conformance jobs passing. Four UI E2E jobs failed, leaving the aggregate CI gate red:

Job Failing files/signature
UI 2/9 chat-workspace-directory-race.e2e.test.ts: reports button timeout; sidebar-complete-roster.e2e.test.ts: four missing child-toggle cases.
UI 3/9 chat-file-links.e2e.test.ts: Files filter button timeout.
UI 6/9 session-management.operator-scopes.e2e.test.ts: SESSION_WRITE organization assertion, expected 1, received 0.
UI 7/9 chat-workspace-downloads.e2e.test.ts: large.txt button timeout.

No UI files changed in this PR. Each failed job's log was fetched once. The latest scheduled-main result available during the investigation was 40040034138, source 2a7d1994c2a1477483661bc4af5cc90e4d76e8df, which predates subsequent UI changes and has no matching UI signatures. Inherited attribution remains unverified; these failures are not dismissed or rerun for green. The performance hold already prevents landing; final CI is not claimed green.

Deployment Signal and Limits

During scheduled operator continuations, roster projection and repeated state-path resolution should disappear below availability checks; canonical normalization should no longer allocate there. Assertion frequency and next-check revocation should remain unchanged. Windows without these jobs need not show a measurable difference. The owner benchmark measures successful last-entry checks; raw compatibility and removal/refusal behavior are covered by tests. The synthetic turn uses a small fixture and does not establish production capacity.

Lead handoff: keep this candidate unmerged because of the repeated GC concern. The requested owner and authenticated continuation evidence is complete; the concurrent comparison was unavailable. Production growth (+41 lines), small whole-turn fixture, serial host exposure and unresolved GC causality are explicit limitations. Final-head CI is complete with the four UI E2E jobs above still red. Inherited attribution and GC causality remain open; no merge is authorized by this handoff.

@clawsweeper

clawsweeper Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

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

Copy link
Copy Markdown
Contributor

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-24T00:13:13.299793Z 27d9c4e New commits
ℹ️ 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.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling size: M labels Oct 23, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 23, 2026
@clawsweeper

clawsweeper Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR reduces temporary allocation in cron availability checks while preserving live agent eligibility checks.

Example: Check worker-499 before a scheduled continuation in a 500-agent keyed roster.

  • Before: Project and normalize the roster, construct an ID collection, and resolve the admission state path for each check.
  • After: Look up worker-499 directly and read current admission decisions using the service-bound state path.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The implementation appears coherent and behavior-preserving, but the required performance evidence is explicitly unfinished.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Larger agent fleets incur avoidable memory churn during scheduled continuations.
Reason: Maintainer-authored direction targets source-confirmed redundant work while retaining existing behavior and ownership.

Merge readiness

✅ Ready for maintainer review

Keep open: this owner-directed optimization uses existing roster and admission owners, and no definite introduced correctness defect was found.

Priority: P2
Reviewed head: 18ed0c21152ef1000699652a5928e2c3993af0cb

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence lacks the planned paired allocation results and authenticated scheduled continuation exercising the changed availability callback.
Agent review details

How this fits together

Cron availability combines the current agent roster, deletion facts, and database admission decisions to allow or reject scheduled work.

flowchart TD
  A[Scheduled occurrence] --> B[Cron service]
  B --> C[Deletion facts]
  B --> D[Live roster]
  B --> E[Live admission decisions]
  C --> F[Availability decision]
  D --> F
  E --> F
  F --> G[Run or reject]
Loading

Technical review

Best possible solution:

Use direct live roster membership and a state-bound admission reader while preserving every existing revocation check.

Do we have a high-confidence way to reproduce the issue?

Current-main source shows each availability check constructing roster projections and normalized ID collections; runtime allocation magnitude was not independently reproduced during this read-only review.

Is this the best way to solve the issue?

The smallest complete fix belongs in the existing roster and admission owners, and the patch follows that boundary without adding a cache or competing decision store.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8c9fb121e8cd.

Provenance checked

  • Raw roster membership and absent-versus-empty semantics keeps the original intent (fix(memory): read the searched workspace for explicit agents #147072: Extract a lightweight shared roster owner while preserving shipped raw-reader compatibility and distinct runtime ownership.)
  • Strict and lenient agent ID normalization keeps the original intent (aeff737: Reject unrepresentable explicit IDs without changing lenient default and persisted-routing normalization.)
  • Captured state selection with live admission decisions keeps the original intent (7abc1b2: Prepare agent/state selection once while retaining current refusal publications and preparation-scope checks.)
  • Cron deletion and database-refusal checks keeps the original intent (fix(gateway): admit healthy agents when one agent's database copies diverged #145426: Scheduled work consumes the shared admission decision so an isolated unhealthy agent cannot execute while healthy agents remain available.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • PollyBot13: Raw commit b5b7ca4 adds src/agents/agent-roster.ts:51 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: b5b7ca44ac41; files: src/agents/agent-roster.ts)

PR surface

Source +42, Tests +57, Other +150. Total +249 across 9 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 6 59 17 +42
Tests 2 57 0 +57
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 150 0 +150
Total 9 266 17 +249

Review metrics

Metric Value Why it matters
Production versus test growth Runtime production +59/−17; tests +57; benchmark tooling +150. Growth supports direct membership with existing raw-roster semantics, a live state-bound reader, focused lifecycle coverage, and a rerunnable allocation workload.

Labels

Label changes:

  • add P2: A bounded allocation optimization for scheduled work, without evidence of an urgent user-facing regression.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: A bounded allocation optimization for scheduled work, without evidence of an urgent user-facing regression.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 23, 2026, 7:24 PM ET / 23:24 UTC.

@steipete
steipete force-pushed the steipete/perf-buf4-cron-availability-20261023 branch from 18ed0c2 to b04847d Compare October 23, 2026 23:45
@steipete
steipete force-pushed the steipete/perf-buf4-cron-availability-20261023 branch from b04847d to cd2a047 Compare October 23, 2026 23:59
@steipete
steipete force-pushed the steipete/perf-buf4-cron-availability-20261023 branch from cd2a047 to 27d9c4e Compare October 24, 2026 00:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

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: 27d9c4e539

ℹ️ 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 (owner === "server-cron") {
source = source.replace(/isAgentAvailable: \(agentId, facts\) =>([\s\S]*?),\n resolveSessionStorePath,/,
(_match, expression) => "isAgentAvailable: (agentId, facts) => {" + count("isAgentAvailable") + "return " + expression + "; },\n resolveSessionStorePath,");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Preserve the expression when instrumenting cron availability

With --authority-counts, the captured expression begins with a newline because server-cron.ts puts the arrow body on the next line. Concatenating it after return triggers automatic semicolon insertion, so the instrumented callback always returns undefined without evaluating the admission-refusal or roster checks. Cron consumers such as run-queue-execution.ts check === false, so the benchmark bypasses these checks while still counting their invocation, invalidating its availability-work measurements. Trim the expression or enclose it in parentheses after return to preserve the original behavior.

Useful? React with 👍 / 👎.

@steipete

Copy link
Copy Markdown
Contributor Author

Closing on cost versus value, not correctness. The owner result is real: availability-check allocation fell from 2.3–116 KB per check (10–500 agents, entries and list rosters) to the sampling floor. Revocation timing is unchanged.

Three things keep it from landing as is:

  1. The campaign's power rule. This owner is about 4% of Team main-thread allocation only while scheduled cron operator-source runs are active: 4.07% in the r192 19:52Z window and 0.00% in the 23:29Z steady-state window. Owners under 5% land only as net simplifications, and this change is +65/−24 production lines across six files, including a shared normalizeAgentId fast path in normalization-core.
  2. Unresolved GC signal. Total GC per turn rose in both serial comparisons (38.56 → 52.94 ms and 41.05 → 59.41 ms) while allocation fell 9–10%. Those were five-turn serial runs because no quiet slot was granted, so they can't decide anything, but we don't land with that direction unexplained.
  3. The measurement queue. The Team perf lanes hold the slots for hours, so a concurrent pair for an intermittent owner is a poor use of them.

The more important finding is the call count. An authenticated cron turn makes about 38,550 availability checks, one per authority assertion on the cron delivery fence. Each check is now cheap, but the count is where the cost comes from. Checking availability at the effect rather than on every assertion would be the simplification. That is an authority-design question, recorded for the Team perf session.

The branch stays on the remote as the restart point. Evidence is in the lane report.

@steipete steipete closed this Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant