Skip to content

fix(activity): stop recap calls after operator policy revocation - #184279

Merged
steipete merged 2 commits into
mainfrom
steipete/perf-micro-recap-honor-revocation-20260919
Oct 26, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/perf-micro-recap-honor-revocation-20260919

Conversation

@steipete

@steipete steipete commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Activity recaps could call the utility provider after the session owner's operator model policy was revoked. The service-authority contract documented in #183897 deliberately allowed this; this change implements the approved decision to honor the owner's committed policy.

User Impact

Recaps follow the assigned human owner, otherwise the authenticated profile creator, independently of the viewer requesting a refresh. Assignment to an agent or the system preserves the creator's restriction. Historical owner aliases resolve to the current canonical profile after a profile merge. Denied or revoked work keeps the cached recap and records a reason.

Ordinary sessions without an assigned human owner or authenticated profile creator retain service authority. Cron, subagent, incognito, and isolated-heartbeat sessions remain excluded from recap generation.

Why This Change Was Made

The recap owner carries committed ownership facts, retains a profile-catalog lease, and binds the existing operator authority only when a model call is needed. It revalidates after awaited work and expires retained callbacks when work settles. Utility completion owns the final provider checks, retries, and fallbacks. The shared policy reader also observes committed config-publication revisions, including publication of the same config object, using the prepared model-policy cache from #183793.

Production delta: +110 lines; tests +116; docs +4, across nine files. The growth implements the newly required authority boundary. There is no new policy cache, schema, or configuration option. The old service-authority exemption is removed, and ownership selection reuses the canonical session helper.

Evidence

Complete sanitized provider trace: final head 51475bc5e62c70ebc0267795b4d0fb5dc025f241 passed ten isolated built-Gateway revocation iterations. All 30 HTTP provider arrivals are listed: 20 primary turns + 10 allowed recaps, zero requests from revoke invocation through ACK, and zero after ACK. Each observation window included at least ten seconds of provider quiet. All ten allowed sessions saved nonempty recap text; ten denied recap attempts logged the policy error with no retry scheduled. No late or cross-iteration requests occurred, and teardown passed.

The initial current-main baseline d15362ab1797087b3dac04074a1ad38919f45a70 made 40 requests, including seven revoked recap calls between config write and ACK and three after ACK. Its recap owner is byte-identical to the final comparison baseline 99501d269444e6b7be7789bc1cd91a67833103ff.

The two regression cases exercise real session/profile writers and utility policy admission: merged owner aliases still allow recaps; revocation during awaited preparation blocks further calls and preserves cached text; retained authority expires; a human creator's denial survives nonhuman assignment; true service recaps still complete. Both original regressions failed on baseline, and the alias/creator refinements failed on the initial PR head. The corrected recap file passed 22/22; freshness/retry and operator-authority siblings passed 51/51; eager-import and PR-wrapper closure guards passed 22/22. Changed-file format/lint, export-name collision checks, and the targeted gateway-root test-types leaf passed.

Both final revisions passed the supported pnpm build sourcePerformance runtime build on Node 26.12.1 and were frozen with source/build hashes before replay or load. The unchanged dependency and native-protocol inputs were verified before reusing the install. Earlier full builds also passed. Independent subagent review (autoreview route unavailable) found no actionable P0–P2 issue; the latest GitHub code review is clean on the final head. The merged-profile finding is fixed and its review conversation resolved.

CI

Final-head CI run 40281550861, attempt 1 has one non-aggregate failure: checks-node-changed-3, in src/cron/isolated-agent/run.operator-continuation.test.ts. Four assertions expect the GitHub tool schema not to contain inspect: legacy attribution, foreign target, queued manager rename, and owner capture races manager payload.

The identical focused command, node scripts/run-vitest.mjs src/cron/isolated-agent/run.operator-continuation.test.ts --maxWorkers=1, produced the same four failures and 16 passes on base 99501d269444 (162.96 s) and head 51475bc5e62c (194.20 s). The CI gate failure is downstream of that inherited shard. All other CI-workflow jobs passed or were skipped. The initial-head fixture type error was fixed; the final test-types job passes. No CI rerun was requested.

Load comparison

The canonical harness is from baseline 99501d269444, which contains the required ed32fdcd tooling revision. It uses two already-built revisions, synthetic state, isolated loopback Gateways, mock providers, and native subagents. No production Gateway was load-tested. The initial interrupted campaign completed no arms and is superseded; it contributes no result.

node --import ./scripts/tsx.mjs scripts/perf/team-shape-stress.ts \
  --base <frozen-base> --candidate <frozen-candidate> \
  --output "$PWD/.local/team-stress-comparison" \
  --minutes 10 --pairs 2 --operator-model-policy

All eight arms completed at least 600 measured seconds, with zero RPC errors. Every arm completed 40 foreground turns, 40 tool calls/results, and 173 utility requests including 80 actual recaps. Shutdown verified that no owned processes remained.

Assessment: no declared adverse threshold was met. This is an authority correctness change, not a speedup claim. Untraced paired means show CPU +0.495 percentage points (+5.29%), GC +40.22 ms/min (below the 50 ms/min absolute gate), and loop p99 +0.598 ms. Both maximum-pause comparisons remain below max(50 ms, 2 × baseline maximum). Major-GC counts are below 50 per arm. Allocation is effectively flat at +0.16%, with opposite-sign pairs. Client/handler tails and heap also have mixed-sign pairs under differing host load, so they are inconclusive rather than evidence of an attributed improvement or regression. RSS was lower in both timing pairs. No A/A controls were run; no adverse conclusion is asserted.

Sampled allocation measures JavaScript allocations, not external/native allocation or retained-heap growth. Per-arm values, sample counts, server-handler boundaries, host load, GC maxima, and achieved work follow.

Frozen baseline 99501d269444e6b7be7789bc1cd91a67833103ff; candidate 51475bc5e62c70ebc0267795b4d0fb5dc025f241. Controller/runtime pinned to v26.12.1.

10,800 synthetic sessions, 40 plugins, 65 identified operator WebSocket clients, concurrent mock-provider turns with tools/native subagents, sidebar/list/search/history churn. Timing AB/BA and separate allocation AB/BA; ten measured minutes plus one-minute warmup per arm.

RSS is process-wide and heap is the main isolate; both are end-window values. Handler p99 is interpolated from Prometheus histogram deltas and is distinct from client round-trip latency. Host load is the mean and range of sampled one-minute load averages. Allocation-pass CPU/GC/latency are diagnostic. No partial/superseded arm contributes to this report.

Arm Allocation MiB/s Main CPU % GC s/min Loop p99 ms (n) Client list p99 ms (n) Handler p99 / mean ms (n) RSS / heap MiB Host load mean (range)
timing 1 base — 10.14 0.234 38.70 (27624) 290.07 (1193) 253.37 / 18.98 (1173) 2660.0 / 702.4 42.4 (22.9–59.3)
timing 1 candidate — 10.82 0.314 38.40 (27667) 122.49 (1204) 91.35 / 15.01 (1173) 2584.2 / 701.2 41.6 (31.8–48.4)
timing 2 candidate — 8.89 0.193 32.85 (28001) 90.24 (1202) 68.47 / 12.43 (1173) 2567.2 / 681.5 25.3 (16.3–33.6)
timing 2 base — 8.58 0.193 31.36 (28515) 60.29 (1194) 37.53 / 13.11 (1173) 2652.1 / 664.0 19.5 (9.6–29.2)
allocation 1 base 26.83 11.34 0.416 38.90 (27723) 245.38 (1193) 131.75 / 17.78 (1173) 2663.1 / 657.2 41.5 (28.9–57.2)
allocation 1 candidate 25.54 11.55 0.430 42.30 (27122) 253.80 (1193) 110.58 / 18.50 (1173) 2693.3 / 660.5 47.1 (37.0–69.9)
allocation 2 candidate 27.33 12.23 0.518 44.76 (27075) 209.87 (1193) 171.17 / 18.74 (1173) 2683.6 / 660.2 55.6 (42.0–74.3)
allocation 2 base 25.96 10.51 0.332 36.70 (27488) 94.93 (1193) 54.23 / 13.51 (1173) 2604.3 / 657.3 30.1 (24.6–37.8)

Untraced GC cells below show count / total milliseconds / p95 / p99 / maximum pause milliseconds. Every tail retains its sample count; major-GC tails below 50 collections and p99 below 1,000 samples are context. No pause or maintenance window was excluded.

Arm Minor Major Incremental
1 base 574 / 1624.63 / 5.16 / 16.64 / 56.67 26 / 688.38 / 40.22 / 50.02 / 50.00 26 / 25.33 / 1.87 / 2.00 / 2.00
1 candidate 693 / 2005.65 / 5.44 / 12.28 / 75.63 39 / 1089.15 / 51.94 / 77.44 / 77.38 39 / 47.30 / 1.52 / 9.39 / 9.39
2 candidate 616 / 1165.94 / 3.25 / 5.67 / 13.08 29 / 738.46 / 42.66 / 68.80 / 68.79 29 / 27.45 / 1.35 / 2.48 / 2.49
2 base 608 / 1197.29 / 3.21 / 5.47 / 11.99 30 / 705.84 / 34.88 / 39.39 / 39.38 30 / 26.89 / 1.16 / 1.20 / 1.20

Paired signed mean deltas from the canonical report:

Metric Base Candidate Absolute delta Relative delta Paired absolute deltas
mainThreadCpuPercent 9.3605 9.8557 0.4953 5.29% 0.6785, 0.3120
gcSecondsPerMinute 0.2133 0.2535 0.0402 18.85% 0.0805, -0.0000
eventLoopP95Ms 23.7814 24.5842 0.8028 3.38% 0.7700, 0.8356
eventLoopP99Ms 35.0290 35.6270 0.5980 1.71% -0.2949, 1.4909
sessionsListP99Ms 175.1798 106.3652 -68.8146 -39.28% -167.5737, 29.9446
rssMiB 2656.0452 2575.7345 -80.3107 -3.02% -75.7717, -84.8497
heapMiB 683.1774 691.3693 8.1919 1.20% -1.1354, 17.5193
allocationMiBPerSecond 26.3925 26.4358 0.0432 0.16% -1.2876, 1.3741
Arm Turns Tool calls/results Recap / utility requests RPC/min List/min Writes
timing 1 base 40 40/40 80 / 173 195.63 119.20 101
timing 1 candidate 40 40/40 80 / 173 198.14 120.36 100
timing 2 candidate 40 40/40 80 / 173 195.16 120.05 101
timing 2 base 40 40/40 80 / 173 192.39 119.40 103
allocation 1 base 40 40/40 80 / 173 196.64 119.21 102
allocation 1 candidate 40 40/40 80 / 173 197.89 119.11 103
allocation 2 candidate 40 40/40 80 / 173 199.07 119.10 102
allocation 2 base 40 40/40 80 / 173 195.48 119.22 102

@clawsweeper

clawsweeper Bot commented Oct 26, 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 26, 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-26T06:45:56.224397Z 51475bc 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.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 51475bc5e62c70ebc0267795b4d0fb5dc025f241
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/gateway/operator-run-authority.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/session-activity-summary-authority.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: M labels Oct 26, 2026

@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: 735ddb5345

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

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

This PR binds Activity recap generation to the session owner's operator model policy and observes committed policy revocation.

Example: A session owner's role removes test/utility while recap preparation is pending.

  • Before: The recap can still call test/utility under Gateway service authority.
  • After: The call is denied and the previous recap remains visible.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) Useful, approved direction with a definite merged-profile regression and an unfulfilled final-effect evidence gate.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: An administrator can revoke an operator's model access while background recaps continue sending transcript excerpts to the utility provider.
Reason: The maintainer-authored PR explicitly approves replacing the previous service-authority exception with owner-bound policy enforcement.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep open: this maintainer-approved policy change has clear value, but merged-profile sessions introduce a concrete recap regression.

Priority: P2
Reviewed head: 735ddb5345865ed4ac069f8251136666769d9356

Before merge

  • Add real behavior proof - Authority-chain proof required: the body reports an isolated built-Gateway replay with allowed recaps and zero revoked-owner provider requests, but supplies narrative results rather than inspectable request logs or a linked trace; the added tests inject the completion function and do not establish final provider I/O. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Resolve merged profile aliases before binding recap authority (P2) - After users.merge, an existing session can retain the source profile ID in owner.actor.id or createdActor.id. prepareUserProfileIdentity binds that historical ID, but bindPreparedUserProfileIdentity rejects readCurrentProfile when alias resolution returns the canonical target ID. Every recap attempt then fails even when the target profile permits the utility model. Resolve the stored ID through the existing alias-aware profile catalog, then prepare authority and resolve role policy with the canonical ID while preserving the session ownership guard. This independently confirms the existing review comment.
  • Resolve merge risk - The author must provide inspectable final-effect evidence that allowed recaps reach the provider while revoked-owner recaps are rejected before provider I/O.

Findings

  • [P2] Resolve merged profile aliases before binding recap authority — src/gateway/session-activity-summary-authority.ts:50-53

Tests

  • Missing end-to-end proof: Attach the existing redacted Gateway/provider trace for allowed and revoked-owner recaps, including the post-revocation quiet window; redact keys, IPs, phone numbers, and non-public endpoints.
Agent review details

How this fits together

The Gateway recap service consumes committed session ownership and transcript excerpts, invokes the utility completion owner, and persists a bounded recap.

flowchart LR
  A[Session ownership receipts] --> B[Gateway recap service]
  C[Profile catalog and role policy] --> D[Operator authority]
  B --> D
  D --> E[Utility completion]
  E --> F[Provider request]
  E --> G[Persisted recap]
Loading

Technical review

Best possible solution:

Resolve historical profile IDs through the existing alias-aware catalog before binding canonical authority, while retaining ownership and revocation checks.

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

Current main explicitly permits service-owned recaps after operator revocation, and the PR reports a matching baseline replay; no reproduction was executed during this read-only review.

Is this the best way to solve the issue?

Reusing profile-backed operator authority and the existing utility completion boundary is appropriate, but historical profile aliases must resolve before canonical authority is captured.

Full review comments:

  • [P2] Resolve merged profile aliases before binding recap authority — src/gateway/session-activity-summary-authority.ts:50-53
    After users.merge, an existing session can retain the source profile ID in owner.actor.id or createdActor.id. prepareUserProfileIdentity binds that historical ID, but bindPreparedUserProfileIdentity rejects readCurrentProfile when alias resolution returns the canonical target ID. Every recap attempt then fails even when the target profile permits the utility model. Resolve the stored ID through the existing alias-aware profile catalog, then prepare authority and resolve role policy with the canonical ID while preserving the session ownership guard. This independently confirms the existing review comment.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 15915bf1367a.

Merge-risk options

Maintainer options:

  1. Attach the recorded provider-boundary evidence (recommended)
    The author supplies the existing redacted Gateway/provider trace showing allowed requests and zero revoked-owner recap requests.
  2. Hold the authority change
    Keep this PR open until its provider-boundary evidence is available.

Provenance checked

  • Recap service-authority exemption and documentation changes intended behavior with a stated reason (docs(gateway): clarify activity recap service authority #183897: The prior change deliberately documented bounded recaps as Gateway metadata independent of operator model policy.)
  • Shared operator model-policy reader keeps the original intent (2a30561: The reader consolidated original and recovered admission while preserving original and current model ceilings.)
  • Recap entry projection and cleanup keeps the original intent (2bd6ca1: Retain only recap-consumed session facts rather than full session payloads.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Dallin Romney: Raw commit 2a30561 adds src/gateway/operator-run-authority.ts:128 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2a305612539c; files: src/gateway/operator-run-authority.ts)

PR surface

Source +104, Tests +100, Docs +3. Total +207 across 9 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 113 9 +104
Tests 1 101 1 +100
Docs 4 13 10 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 227 20 +207

Labels

Label changes:

  • add P2: This changes a bounded background recap policy and introduces a regression for sessions referring to merged profiles.
  • add merge-risk: 🚨 security-boundary: The PR changes which operator policy authorizes provider requests, and the reported final-effect results lack an inspectable trace.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P2: This changes a bounded background recap policy and introduces a regression for sessions referring to merged profiles.
  • merge-risk: 🚨 security-boundary: The PR changes which operator policy authorizes provider requests, and the reported final-effect results lack an inspectable trace.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

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 26, 2026, 2:31 AM ET / 06:31 UTC.

Bind recap utility calls to the committed session owner policy and retain live authority through preparation, fallback, completion, and cleanup. Preserve cached text and record denied work. Explicit service-owned recaps keep service authority.

Release-note context: Activity recaps now stop making model calls when their owning operator is denied or revoked, including requested refreshes.
@steipete
steipete force-pushed the steipete/perf-micro-recap-honor-revocation-20260919 branch from 735ddb5 to 51475bc Compare October 26, 2026 06:43
@steipete

Copy link
Copy Markdown
Contributor Author

Final built-Gateway revocation trace

Final candidate: 51475bc5e62c70ebc0267795b4d0fb5dc025f241. Runtime: Node 26.12.1. Build timestamp: 2026-10-26T06:58:22.803Z.

Built dist/entry.js SHA-256: 2914e91d54fb09ecc637bf5dcd06482c1901462c440afa6adf06604a47541404.
Recap authority source SHA-256: a86ccacfef9f5fdddd0fbf906a3c0c31851a6d9feba5deaa899bf764a776331e.

This is an allowlisted export of the actual synthetic mock-provider arrival log and Gateway RPC acknowledgments. It contains every provider request from the ten final replay iterations; full prompts, transcript bodies, credentials, profile IDs, host details, addresses and private artifact paths are omitted. ALLOWED and HELD are synthetic message/session correlation markers. Auxiliary requests below were identified as Activity recaps from their captured system prompt; the prompt itself is omitted.

The identified operator role allowed both openai/gpt-4.1 and openai/gpt-4.1-mini before each revocation. Each iteration completed an allowed turn, held another primary stream while a second operator turn queued, committed modelPolicy.allow: [] through config.patch, then awaited the held/queued/subsequent policy errors and at least ten seconds of provider quiet. Every denied, queued and subsequent turn made zero provider requests. All provider responses were settled before the next iteration.

Final result: 10/10 iterations; 20 primary requests and 10 allowed Activity recaps. Zero provider requests from revoke invocation through acknowledgment, and zero after acknowledgment through the settled observation boundary. All ten allowed recaps persisted nonempty text. All ten revoked recap skips recorded the operator-policy error with no retry scheduled.

Iteration Allowed recap arrival (UTC) Revoke invocation (UTC) Revoke ACK (UTC) Settled observation end (UTC) Requests invoke→ACK / after ACK
1 2026-10-26T07:05:02.756Z 2026-10-26T07:05:04.127Z 2026-10-26T07:05:04.709Z 2026-10-26T07:05:15.043Z 0 / 0
2 2026-10-26T07:05:16.209Z 2026-10-26T07:05:18.553Z 2026-10-26T07:05:19.002Z 2026-10-26T07:05:30.685Z 0 / 0
3 2026-10-26T07:05:31.619Z 2026-10-26T07:05:33.727Z 2026-10-26T07:05:34.022Z 2026-10-26T07:05:44.499Z 0 / 0
4 2026-10-26T07:05:47.527Z 2026-10-26T07:05:48.824Z 2026-10-26T07:05:49.051Z 2026-10-26T07:05:59.490Z 0 / 0
5 2026-10-26T07:06:00.373Z 2026-10-26T07:06:02.562Z 2026-10-26T07:06:02.750Z 2026-10-26T07:06:13.146Z 0 / 0
6 2026-10-26T07:06:14.421Z 2026-10-26T07:06:15.685Z 2026-10-26T07:06:15.894Z 2026-10-26T07:06:26.328Z 0 / 0
7 2026-10-26T07:06:27.816Z 2026-10-26T07:06:28.978Z 2026-10-26T07:06:29.186Z 2026-10-26T07:06:39.631Z 0 / 0
8 2026-10-26T07:06:41.596Z 2026-10-26T07:06:43.254Z 2026-10-26T07:06:43.645Z 2026-10-26T07:06:54.212Z 0 / 0
9 2026-10-26T07:06:56.264Z 2026-10-26T07:06:57.730Z 2026-10-26T07:06:58.064Z 2026-10-26T07:07:08.647Z 0 / 0
10 2026-10-26T07:07:10.306Z 2026-10-26T07:07:11.657Z 2026-10-26T07:07:11.971Z 2026-10-26T07:07:22.492Z 0 / 0

Complete provider request timeline

All timestamps are request arrival at the mock HTTP handler, before reading its body. No request is excluded by model, purpose, or arrival phase. The HELD primary requests below precede revocation and were canceled by the committed policy change; there are no HELD recap requests.

Request Iteration Arrival (UTC) Model Category Synthetic marker
1 1 2026-10-26T07:05:02.580Z gpt-4.1 Primary turn PROOF_I1_ALLOWED
2 1 2026-10-26T07:05:02.756Z gpt-4.1-mini Activity recap PROOF_I1_ALLOWED
3 1 2026-10-26T07:05:03.534Z gpt-4.1 Primary turn PROOF_I1_HELD
4 2 2026-10-26T07:05:16.095Z gpt-4.1 Primary turn PROOF_I2_ALLOWED
5 2 2026-10-26T07:05:16.209Z gpt-4.1-mini Activity recap PROOF_I2_ALLOWED
6 2 2026-10-26T07:05:17.777Z gpt-4.1 Primary turn PROOF_I2_HELD
7 3 2026-10-26T07:05:31.549Z gpt-4.1 Primary turn PROOF_I3_ALLOWED
8 3 2026-10-26T07:05:31.619Z gpt-4.1-mini Activity recap PROOF_I3_ALLOWED
9 3 2026-10-26T07:05:33.044Z gpt-4.1 Primary turn PROOF_I3_HELD
10 4 2026-10-26T07:05:47.461Z gpt-4.1 Primary turn PROOF_I4_ALLOWED
11 4 2026-10-26T07:05:47.527Z gpt-4.1-mini Activity recap PROOF_I4_ALLOWED
12 4 2026-10-26T07:05:48.180Z gpt-4.1 Primary turn PROOF_I4_HELD
13 5 2026-10-26T07:06:00.306Z gpt-4.1 Primary turn PROOF_I5_ALLOWED
14 5 2026-10-26T07:06:00.373Z gpt-4.1-mini Activity recap PROOF_I5_ALLOWED
15 5 2026-10-26T07:06:01.947Z gpt-4.1 Primary turn PROOF_I5_HELD
16 6 2026-10-26T07:06:13.814Z gpt-4.1 Primary turn PROOF_I6_ALLOWED
17 6 2026-10-26T07:06:14.421Z gpt-4.1-mini Activity recap PROOF_I6_ALLOWED
18 6 2026-10-26T07:06:15.004Z gpt-4.1 Primary turn PROOF_I6_HELD
19 7 2026-10-26T07:06:27.240Z gpt-4.1 Primary turn PROOF_I7_ALLOWED
20 7 2026-10-26T07:06:27.816Z gpt-4.1-mini Activity recap PROOF_I7_ALLOWED
21 7 2026-10-26T07:06:28.337Z gpt-4.1 Primary turn PROOF_I7_HELD
22 8 2026-10-26T07:06:41.483Z gpt-4.1 Primary turn PROOF_I8_ALLOWED
23 8 2026-10-26T07:06:41.596Z gpt-4.1-mini Activity recap PROOF_I8_ALLOWED
24 8 2026-10-26T07:06:42.616Z gpt-4.1 Primary turn PROOF_I8_HELD
25 9 2026-10-26T07:06:56.162Z gpt-4.1 Primary turn PROOF_I9_ALLOWED
26 9 2026-10-26T07:06:56.264Z gpt-4.1-mini Activity recap PROOF_I9_ALLOWED
27 9 2026-10-26T07:06:57.027Z gpt-4.1 Primary turn PROOF_I9_HELD
28 10 2026-10-26T07:07:09.507Z gpt-4.1 Primary turn PROOF_I10_ALLOWED
29 10 2026-10-26T07:07:10.306Z gpt-4.1-mini Activity recap PROOF_I10_ALLOWED
30 10 2026-10-26T07:07:11.041Z gpt-4.1 Primary turn PROOF_I10_HELD

Saved result and recorded denial

A read-only query of the isolated synthetic session store after shutdown found nonempty recap text on all ten ALLOWED sessions. Each saved recap was Synthetic authority proof complete. The session creator facts identify the same synthetic operator used by its turn; this does not exercise the service-owned exception.

The Gateway recorded ten info-level Activity recap deferred entries with the following allowlisted fields:

{
  "agentId": "main",
  "error": "Your operator role cannot use this model. Choose an allowed model or ask a gateway administrator to update your role's model policy.",
  "retryScheduled": false
}

Final cleanup completed at 2026-10-26T07:07:22.876Z. The controller verified the owned Gateway process group and both loopback listeners were stopped. The all-request audit recorded zero late-after-settled or cross-iteration requests.

For contrast, the initial current-main replay at d15362ab1797087b3dac04074a1ad38919f45a70 recorded 40 requests: 20 primary and 20 recaps, including seven revoked-session recap calls between server config write and ACK and three after ACK. That baseline recap owner is byte-identical to final stress baseline 99501d269444e6b7be7789bc1cd91a67833103ff (SHA-256 174a94305bf3432a23e2cd4ddb2544427a65ef9d16cdbe369e2c3e6872418037). The fresh stress comparison uses exact final B/H builds and is reported separately.

@steipete

Copy link
Copy Markdown
Contributor Author

The merged-profile finding is fixed on 51475bc5e62c70ebc0267795b4d0fb5dc025f241, and the regression now covers merged aliases plus a human-created session assigned to an agent. The review conversation is resolved.

The complete provider-arrival trace shows all ten allowed recaps persisted and zero requests from revocation invocation through the post-ACK quiet windows. The PR body now contains the completed canonical eight-arm, ten-minute-per-arm load comparison, with matched recap counts, server-handler latency, host load, allocation, GC, sample counts, and maxima. No declared adverse threshold was met; mixed-sign metrics remain inconclusive.

Landing under the standing inherited-CI exception: exact-head CI run 40281550861, attempt 1 fails only checks-node-changed-3 plus its downstream gate. The four run.operator-continuation.test.ts failures concern the GitHub tool's inspect action (legacy attribution, foreign target, queued manager rename, owner capture races manager payload). The same focused file fails identically on base 99501d269444 and head 51475bc5e62c: four failures and 16 passes on each. All other CI-workflow jobs passed or were skipped; security review passed. No CI rerun was requested.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@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. labels Oct 26, 2026
@steipete
steipete merged commit dd704fe into main Oct 26, 2026
143 of 147 checks passed
@steipete
steipete deleted the steipete/perf-micro-recap-honor-revocation-20260919 branch October 26, 2026 08:57
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
…nclaw#184279)

* fix(activity): honor operator model policy for recaps

Bind recap utility calls to the committed session owner policy and retain live authority through preparation, fallback, completion, and cleanup. Preserve cached text and record denied work. Explicit service-owned recaps keep service authority.

Release-note context: Activity recaps now stop making model calls when their owning operator is denied or revoked, including requested refreshes.

* fix(activity): resolve recap owners through profile aliases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. security-sensitive-changed size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant