Skip to content

fix(agents): restore manual and preflight native compaction - #157977

Merged
steipete merged 9 commits into
mainfrom
codex/compaction-model-source-20260925
Sep 25, 2026
Merged

steipete merged 9 commits into
mainfrom
codex/compaction-model-source-20260925

Conversation

@steipete

@steipete steipete commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Standalone harness compaction starts a new native turn, but the dispatcher did not carry the caller's host capability or register model-source ownership for that turn. Codex refused inference before provider egress even after an ordinary turn completed successfully.

Core now retains the original caller authority in a compaction admission and passes the existing host capability to the plugin. Codex registers that source with its native monitor, binds the actual compaction turn, and retains authority and resources through terminal completion. Manual Gateway requests, /compact, queued compaction, and CLI preflight share this handoff.

User Impact

Manual and required-preflight compaction can use the caller's existing model authority. Revocation, FIFO ordering, binding checks, and ambiguous-write cleanup remain enforced. A confirmed native result retains precedence over a later caller abort. A monitor first created by compaction also retains clients and parent subscriptions for subsequent child work.

The default callback types and capability version remain source-compatible. Version 2 of the existing compaction parameter types requires the capability; the default preserves the legacy source shape. No SDK export names are added. An older host omitting the capability receives an actionable refusal before native work; omitted authority never becomes System authority. This is a runtime compatibility requirement for independently installed plugins, described below. There is no new configuration, permission, schema, durable store, or update migration.

Why This Change Was Made

The host owns source authority and prepared plugin generation; plugins consume the existing capability. The repair reuses the native monitor, per-thread queue, binding lease, and asynchronous resource owner. Native aliases require matching host-prepared provider/model evidence and the actual inference request tuple. Persisted model names cannot grant another provider's permissions.

Evidence

Both temporary diagnostics are removed in 91382d08. Its complete source tree exactly matches pre-diagnostic head b9d8895a; the compaction implementation and prior review inputs are unchanged. The bounded investigations did not establish a Gateway or authentication fix. Fresh ordinary CI 36168978713 passed on exact restored head 91382d08925ea6681d823117a6c9237e6b0fdce3. The native maintainer workflow merged this exact head as 34ddb38956688e338123978753559e7990bc067e; the publication restriction below remains.

Compaction refresh b9d8895a merges main e2d2e9fd, including the Doctor reader/staging-worker assertion fix. The compaction repair is unchanged; current-main validation and foreground-resource test improvements are retained. Evidence below remains attributed to the exact revisions that ran it. The first CI on this merged head stopped in the Gateway config-test hook described below; the later restored-head CI passed before landing.

  • The original registered-dispatch baseline failed both missing-authority cases, with both cancellation controls passing: 27.65 seconds wall time, 3,029,472 KiB peak RSS on isolated Linux. A separate stock-native diagnostic reproduced standalone compaction refusal before provider egress after a successful ordinary turn.
  • Historical candidate runs passed registered handoff (7 cases, 33.00 s), prepared generation selection (161 cases, 44.52 s), legacy adapter refusal (46 cases, 29.57 s), native cancellation (5 cases, 30.19 s), and shared-client lifetime (133 cases, 19.50 s). These are separate single-worker file wall times including setup/imports, not one complete candidate pass. Removing the monitor's retention callbacks failed at the intended active-lease assertion.
  • PR CI 36104497835 tested head 9074e048 merged with main f0eae1f5. It failed on immutable-parameter/unbound-method lint, native-fixture typing, a hooks fixture import cycle and stale options expectation, strict fixture teardown, and a hosted-tail planner assertion. Native cancellation passed all five cases. Other test and static-check results are being reconciled; unrun groups are not passes.
  • The CI repairs preserve method receivers, use immutable derived attempt parameters, remove the type-import cycle, and retain the exact runtimeModel assertion while adding sourceAuthority to its expected options. Successful fixture teardown now joins normal retained release: the resource owner can return a logical result before its final cleanup. Failed or unfinished tests still cancel and drain owned fake turns; a predecessor gate releases in finally so assertion failures cannot strand later cases.
  • The hosted-tail failure is a main-side assertion defect already fixed by fix(plugins): report retained-work settlement once #157836 (449fc2e6). The old assertion counted dist jobs against the 70-Node limit; the correction checks 70 Node jobs and 90 total jobs separately, preserving both limits. No budget is raised here. Attribution is based on source and the owning fix's CI; no pure-base replay is claimed.
  • PR CI 36109004008 then passed every selected test job, lint, architecture checks, production types, and artifact build. Its only failing check was one Copilot fixture type error: the generic host made source retention optional while V2 requires it. The follow-up checks the real capability before forwarding its narrow fields; fresh independent P0–P2 review found no actionable findings. CI 36110765698 subsequently passed every selected check on 898dfd78.
  • The successful CI artifact build generated SDK entry declarations and checked exports. It does not replace the required full build with global declarations. The full Node 26 build and compatibility lane passed on d874a364, including full declarations and CLI/session checks. Subsequent changes affect test fixtures only. The exact-base SDK API comparison is now complete; fresh overall PR CI remains required after incorporating the owning Doctor test fix.
  • Detailed native receipts from CI 36109004008 confirm stock Codex 0.155.1 completed compaction after the setup host closed, with a new turn and clean process exit. Its case took 6.519 s; the three model-policy cases took 0.120 s total. The shared 11-file group passed 244 cases in 130.71 s Vitest / 132.52 s wrapper time; these are not isolated per-file wall times.
  • Following review, the three model-policy cases now send HTTP through the real production inference proxy instead of calling its binding directly. The two forbidden-provider cases require the specific policy denial and zero final writes; the alias control forwards once. A fourth case revokes the original operator source at the real beforeRequest callback and requires rejection before writing. Only the final provider transport is mocked. This stronger test-only delta passed independent P0–P2 review and CI job 108006941511. The two denied-provider rows passed in 74/14 ms, the alias row in 30 ms, and original-source revocation in 28 ms. Their assertions require HTTP 403 and zero final writes for both denied models and the revoked source; the allowed alias makes one write. The exact test file matches both published head 46a6c71a and tested merge 8c9e9d8c (base 34e8976a plus that head). The shared group passed 245 cases across 11 files in 99.20 s Vitest / 101.07 s wrapper time. The stock-native sibling also passed in 5.253 s with its setup host closed, compaction completed, and native process exited. This is real proxy/authority proof with a synthetic final transport, not authenticated provider-service proof.
  • Overall CI 36114515022 failed solely in Doctor’s existing readonly-child reuse test (doctor-config-preflight.pending-read.test.ts:89): one child expected, two observed. That sequential group passed 299 cases and failed 1; later packed groups did not run. The unchanged test is now corrected on main by fix(doctor): finish state migration after legacy install repair #145043 (d069a6cf): it requires one reused reader while separately checking balanced staging-worker requests and clean closure of every child. The owning repair observed those roles on Linux and passed 312 cases in its original 21-file cohort, then exact-head CI 36121989679. Its pre-fix test bytes match this failure. This supports incorporating the owning fix; it is not a reproduction of this PR’s exact failing merge. Fresh PR CI remains required.
  • The final four-row model control restored only the exact pre-fix compaction implementation: both forbidden-provider rows failed at the intended admission assertion, while the alias and source-revocation controls passed (42.15 s file wall). The cleanup control failed its deliberately stale options assertion and the immediate migration successor passed (32.86 s pair wall). The stock-native file passed in 36.40 s isolated wall time. Source restoration was verified after each mutation. The first collection attempt rejected truncated test names; a later SDK attempt was interrupted by controller disk pressure after the completed cleanup/native phases. Those whole attempts remain failed, and the interrupted attempt does not establish its final remote cleanup. Completed phase evidence is reused. A separate SDK-only continuation completed successfully with verified source and cleanup.
  • The canonical SDK comparison from 691d2e5c to 46a6c71a completed in 333.95 seconds on isolated Linux with Node 24.19.0 and pnpm 12.4.2. No SDK entrypoints or exports were added or removed. Two compaction type aliases gain an opt-in version parameter; the default preserves existing callback shapes. The 121 other affected exports retain identical top-level declarations; their report changes come from reachable internal declarations and declaration-emission ordering. Root and an independent source audit inspected the full report (digest 2d0a208b9c00ed867134f75cf994cf2b7287092de3c3c2aaf797732687ca3fb1). This confirms the declaration scope; the independent-plugin runtime requirement below remains. Source stayed unchanged, child processes joined, temporary worktrees were removed, and the Testbox lease completed.
  • Refreshed CI 36142271883 tested merge dd8d95be (head b9d8895a plus base dcc9fb95). Its checks-node-changed-compact-small-1 group contained only server.config-patch.test.ts: six cases passed, then the approved include-only operation case hit the existing 180-second hook timeout. The runner later stopped the stalled process after 300 seconds without output; subsequent work was skipped or cancelled. The test, its Gateway fixture, and the inspected reload/close owners are unchanged from that base. No causal link to compaction has been established, and the log does not distinguish startup from teardown. The bounded observation below did not reproduce the timeout. No deadline, assertion, or required gate has been weakened; the original failed CI remains part of the evidence.
  • A bounded phase observation on the exact failed merge dd8d95be passed 81/81 cases, including the original stalled case. All 448 phase events balanced: 26 startup settlements, client stops, Gateway closes, state cleanups, and reloader shutdowns completed. The unchanged test file ran in its original order with Node 24.19.0, pnpm 12.4.2, two workers, the original deadlines, and a fresh qaRuntime/compiled-worker build after the private observer was applied. Vitest took 157.32 s; the complete shard command took 211.38 s including preparation. The Testbox had 16.55 GB RAM and four physical CPUs restricted to two available CPUs; original CI had 8.22 GB RAM and two CPUs, so this is not an identical hardware reproduction. The observer was removed, source restoration and child settlement were verified, the temporary worktree was removed, and the lease completed. No Gateway timeout fix is claimed.
  • The hosted fixture diagnostic tested merge 49fd7963 (trace head 1efc76bd plus main 8c5b7c2a) on Node 24.19.0 with the original two CPUs and 8.22 GB RAM. The full file passed 81/81 cases in 161.11 s Vitest time, with all 146 fixture spans settled, including 26 complete startup, client-stop, Gateway-close, and state-cleanup cycles. No stalled phase reproduced and no Gateway fix is claimed. The trace was removed once this targeted diagnostic completed; unfinished jobs in that temporary run are not claimed as passes. Source restoration passed formatting/diff checks and exactly restored the reviewed tree; the unchanged compaction review is reused, not represented as newly rerun.
  • Restored-head CI 36161094489 tested merge 63058e1a (head f9748599 plus main 43759b18). Its originating failure was in test/provider-auth-method.openai-siwc.integration.test.ts:79: after the expired sign-in flow settled, the retry returned done: true, status: error instead of a pending authorization note. The original 14-file tooling group passed 880 cases and failed this one; the next packed group did not run, and remaining CI was cancelled. This is distinct from the Gateway hook diagnostic. The bounded investigation below did not reproduce this failure; no cause, compaction attribution, or successful repair is claimed.
  • The SIWC diagnostic job tested merge c6bd8676 (temporary head 40b26416 plus main e124d77e) with the exact original 14-file manifest, Node 24.19.0, two workers, and 8.22 GB RAM. All 881 cases passed in 194.82 s, including the retry case in 132 ms; the following packed file also passed its five cases. The failure did not reproduce, so the failure-only context yielded no new error classification. The diagnostic was removed after that target completed, restoring the exact reviewed source tree. No retry, deadline, assertion, or required gate was weakened, and no authentication repair is claimed.
  • The published full candidate received independent P0–P2 review with no actionable findings. Fresh independent P0–P2 review of the subsequent CI repair also found no actionable findings. The exact restored head passed ordinary CI and native preparation. ClawSweeper revision 14 found no actionable code findings; its residual filename-based data-model checkbox is addressed below. Native landing and cleanup completed.
  • Initial manual CI 36103976620 stopped before product tests because its main-validation tier required matching workflow and target revisions. The invocation was invalid; ordinary PR CI is the selected validation route.

The native regression uses the managed Codex binary with a synthetic final Responses endpoint and no API credentials. Core selection and the isolated client factory are fixture inputs; this is not authenticated live-provider proof.

Related: #140630. This repair does not establish that separate framing proposal's behavioral claims.

Compatibility scope

The new memory-flush-errors.ts file is an exact extraction of four error-formatting/filtering helpers and their existing limits. It has no vector/embedding data, storage access, schema, retention, or migration behavior. This patch changes no updater, Doctor, service, plugin-loading implementation, package dependencies, or stored-data contract; a full published-updater campaign is not warranted by that filename-based classification. No installed mixed-version success is claimed.

Published OpenClaw v2026.9.6 does not pass the required compaction capability, while both source manifests still declare pluginApi >=2026.9.6. Independently packaging these new plugin bytes with that old floor would allow installation and then refuse compaction. No regression in the already-published v2026.9.6 artifacts is claimed. These plugin changes must ship with the first host release containing the handoff: the maintained release preparation and generated-artifact gate raise lower official plugin API floors to that approved host version (scripts/sync-plugin-versions.ts, scripts/release-preflight.mts, and docs/plugins/manifest/package-json.md). Supported plugin-only publication has its own approval and does not run that synchronization; it requires a separately approved compatible host floor before publication. This source PR chooses no release version and authorizes no independent plugin publication.

Carry the original host-issued model authority through compaction and retain it through native completion and cleanup. Preserve caller cancellation, prepared plugin generations, and actual-provider model authorization.

Add registered handoff, model-policy, and credential-free native regressions while keeping shipped callback types compatible.
@clawsweeper

clawsweeper Bot commented Sep 25, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling extensions: codex extensions: copilot size: XL labels Sep 25, 2026
@steipete
steipete marked this pull request as ready for review September 25, 2026 06:47
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components. This comment is informational because the PR author has repository Maintain or Admin access.

  • Current SHA: 91382d08925ea6681d823117a6c9237e6b0fdce3
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/agents/harness/host-source-authority.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 25, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 25, 2026, 2:20 PM ET / 18:20 UTC (Revision 14).

ClawSweeper review

What this changes

The branch carries caller model authority into manual and preflight compaction for the Codex and Copilot plugins and adds lifecycle and authorization coverage.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep this PR open for source landing. Native compaction and final provider authorization have focused proof, and CI passed on the pinned head. The earlier plugin API floor finding remains a real publication concern, but the maintainer explicitly limited this source merge to shipping with a capable host and retained the independent-publication requirement.

Priority: P1
Reviewed head: 91382d08925ea6681d823117a6c9237e6b0fdce3

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused native and final-effect proof supports a broad but coherent repair; the documented plugin publication condition remains for release preparation.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The PR records stock Codex compaction completing a new native turn through the changed harness path, plus production inference-proxy requests showing one allowed final write and zero writes for forbidden models and a revoked source. The final transport is synthetic, and no independently published mixed-version plugin run is claimed; the error-helper extraction changes no stored-data contract.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The PR records stock Codex compaction completing a new native turn through the changed harness path, plus production inference-proxy requests showing one allowed final write and zero writes for forbidden models and a revoked source. The final transport is synthetic, and no independently published mixed-version plugin run is claimed; the error-helper extraction changes no stored-data contract.
Evidence reviewed 10 items Current-main necessity: The fetched main implementation still has the compaction entry point but no sourceAuthority or hostCapabilities handoff; the pinned PR supplies that behavior.
Introduced host authority: The host asserts the original source, admits the compaction run against it, and passes a closure-bound retention capability to the selected harness.
Native dispatch boundary: Codex registers the retained source with its native monitor before issuing thread/compact/start and unregisters it during cleanup.
Findings None None.
Security None None.

How this fits together

Gateway requests, chat commands, queued runs, and CLI preflight can ask the agent harness to compact a session. The host selects the runtime and supplies authority; the plugin performs native compaction and returns the outcome to the session owner.

flowchart LR
  A[Compaction request] --> B[Session and model selection]
  B --> C[Host source authority]
  C --> D[Codex or Copilot plugin]
  D --> E[Native compaction]
  E --> F[Provider authorization]
  F --> G[Session outcome]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +478, Tests +1589, Docs +12, Other -1. Total +2078 across 47 files.

View PR surface stats
Area Files Added Removed Net
Source 23 1767 1289 +478
Tests 22 1982 393 +1589
Docs 1 12 0 +12
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 47 3761 1683 +2078

Review metrics

Metric Value Why it matters
Production and test delta production +478 net lines; tests +1589 net lines The production growth covers the cross-entrypoint authority and native lifecycle repair; the larger test growth exercises its behavior and policy boundary.
Plugin API floors 2 unchanged at >=2026.9.6 Both floors require verification against the first capable host before independent plugin publication.

Stored data model

Persistent data-model change detected: vector/embedding metadata: src/auto-reply/reply/memory-flush-errors.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep host-issued authority as compaction’s source of truth and enforce model policy at provider I/O; before either changed plugin is independently published, set and verify its minimum capable host version.

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

No direct current-main run was performed in this read-only review. Current-main source lacks the handoff, and the PR records a baseline native refusal before provider egress plus passing after-fix native and proxy scenarios.

Is this the best way to solve the issue?

Yes for source repair: the host supplies existing caller authority to the native compaction owner, which checks it at the final provider boundary. The separately approved release process must enforce the compatible plugin floor.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against cac0c021273a.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The PR records stock Codex compaction completing a new native turn through the changed harness path, plus production inference-proxy requests showing one allowed final write and zero writes for forbidden models and a revoked source. The final transport is synthetic, and no independently published mixed-version plugin run is claimed; the error-helper extraction changes no stored-data contract.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P1: Manual and required-preflight compaction are existing agent workflows that can fail before model inference on current main.
  • merge-risk: 🚨 compatibility: Independently shipping either changed plugin with its present floor could install on an older host and refuse compaction; the maintainer has restricted publication accordingly.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The PR records stock Codex compaction completing a new native turn through the changed harness path, plus production inference-proxy requests showing one allowed final write and zero writes for forbidden models and a revoked source. The final transport is synthetic, and no independently published mixed-version plugin run is claimed; the error-helper extraction changes no stored-data contract.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR records stock Codex compaction completing a new native turn through the changed harness path, plus production inference-proxy requests showing one allowed final write and zero writes for forbidden models and a revoked source. The final transport is synthetic, and no independently published mixed-version plugin run is claimed; the error-helper extraction changes no stored-data contract.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • SunnyShu: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Shakker: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (13 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-25T10:40:04.034Z sha 46a6c71 :: blocked before merge. :: [P1] Raise plugin API floors for required compaction authority
  • reviewed 2026-09-25T13:48:24.046Z sha b9d8895 :: blocked before merge. :: [P1] Align compaction plugins with the required host API floor
  • reviewed 2026-09-25T14:45:31.850Z sha b9d8895 :: blocked before merge. :: [P1] Raise the plugin API floors for the required compaction capability
  • reviewed 2026-09-25T16:22:53.522Z sha 1efc76b :: blocked before merge. :: [P1] Raise the plugin API floors for required compaction authority | [P3] Remove the temporary Gateway fixture trace
  • reviewed 2026-09-25T16:39:59.690Z sha f974859 :: blocked before merge. :: none
  • reviewed 2026-09-25T17:00:59.488Z sha f974859 :: blocked before merge. :: none
  • reviewed 2026-09-25T17:29:33.809Z sha 40b2641 :: blocked before merge. :: [P3] Remove the temporary sign-in diagnostic before merge
  • reviewed 2026-09-25T17:55:35.790Z sha 91382d0 :: blocked before merge. :: [P1] Gate both plugins on a host with compaction source authority

@steipete steipete self-assigned this Sep 25, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 25, 2026
Incorporate the landed Doctor reader/staging-worker assertion repair and
current main while preserving the reviewed compaction source-authority fix.
Retain the foreground resource settlement test correction from main.
Temporary diagnostic for the config-patch hook timeout on CI 36142271883. Preserve the original assertions and deadlines; record only fixed phase labels and settlement. Remove this trace before landing the compaction repair.
The hosted diagnostic passed all 81 cases with all 146 fixture phase spans settled. Restore the exact pre-diagnostic source tree; no Gateway timeout fix is claimed. The unchanged compaction implementation retains its completed review and attributed proof.
@clawsweeper clawsweeper Bot removed the rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. label Sep 25, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 25, 2026
Temporarily classify the hidden wizard retry error and observe callback listener and abort ordering for CI 36161094489. Keep the existing assertions, port reuse, deadlines, and cleanup. Exclude raw errors, URLs, ports, and credentials; remove this diagnostic before landing.
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. label Sep 25, 2026
The original 14-file tooling group passed all 881 cases on the hosted Node 24.19 two-worker runner. Restore the exact reviewed pre-diagnostic source tree. The original retry error remains nonreproduced; no authentication repair is claimed.
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 25, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Please reassess exact head 91382d08925ea6681d823117a6c9237e6b0fdce3 with this source-landing disposition. Ordinary CI 36168978713 is green. The temporary Gateway and SIWC diagnostics are removed; the complete tree is identical to the reviewed pre-diagnostic b9d8895a tree. Their failures were investigated without establishing a safe fix; neither is claimed fixed.

The plugin distribution concern is real if these plugin bytes are independently published with the current floor. This PR is authorized source repair and landing, and does not publish packages or choose a release version. The release requirement is retained in the PR body: both changed plugins must first ship with a host that supplies compaction source authority, and any independent publication must select and verify a compatible host floor first. No mixed-version success or automatic standalone capability check is claimed.

The source evidence distinguishes the two publication routes:

  • Coordinated release preparation selects the approved root version, invokes version-scoped preflight, and raises lower plugin API floors through syncPluginApiVersion (scripts/release-prepare.ts:145, scripts/release-preflight.mts:51, scripts/sync-plugin-versions.ts:52). The npm preflight runs release:generated:check (.github/workflows/openclaw-npm-preflight.yml:773).
  • Standalone packaging preserves source compatibility metadata (scripts/lib/plugin-npm-package-manifest.mts:913), and its metadata validator does not prove host capability support. npm publication requires explicit non-preflight dispatch and the npm-release environment (.github/workflows/plugin-npm-release.yml:1498-1500); push/schedule cannot enter that publication job. ClawHub is dispatch-only and requires its separate release approval (.github/workflows/plugin-clawhub-release.yml:795-797,848). These approvals are not a semantic compatibility check. Source landing does not publish either artifact.

I reject choosing an unapproved future release version as a prerequisite for this source merge. That does not waive the documented publication requirement, invent a release-owner acknowledgment, or authorize standalone publication. Please evaluate source-merge readiness on that scope and retain the explicit release follow-up.

The separate data-model classification is a false positive: src/auto-reply/reply/memory-flush-errors.ts contains four extracted error-formatting/filtering helpers and the unchanged 600/200-character limits. It performs no storage, vector/embedding, schema, retention, or migration operation. Its extraction introduces no data-model compatibility proof requirement.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 25, 2026
@steipete
steipete merged commit 34ddb38 into main Sep 25, 2026
244 checks passed
@steipete
steipete deleted the codex/compaction-model-source-20260925 branch September 25, 2026 18:39
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
…#157977)

* fix(agents): restore manual and preflight native compaction

Carry the original host-issued model authority through compaction and retain it through native completion and cleanup. Preserve caller cancellation, prepared plugin generations, and actual-provider model authorization.

Add registered handoff, model-policy, and credential-free native regressions while keeping shipped callback types compatible.

* fix(compaction): preserve cleanup ordering and repair CI contracts

* test(compaction): require source retention in Copilot fixture

* test(compaction): verify model policy at provider write boundary

* test(gateway): trace config fixture hook settlement

Temporary diagnostic for the config-patch hook timeout on CI 36142271883. Preserve the original assertions and deadlines; record only fixed phase labels and settlement. Remove this trace before landing the compaction repair.

* test(gateway): remove completed config hook diagnostic

The hosted diagnostic passed all 81 cases with all 146 fixture phase spans settled. Restore the exact pre-diagnostic source tree; no Gateway timeout fix is claimed. The unchanged compaction implementation retains its completed review and attributed proof.

* test(auth): observe SIWC retry setup failures

Temporarily classify the hidden wizard retry error and observe callback listener and abort ordering for CI 36161094489. Keep the existing assertions, port reuse, deadlines, and cleanup. Exclude raw errors, URLs, ports, and credentials; remove this diagnostic before landing.

* test(auth): remove completed SIWC diagnostic

The original 14-file tooling group passed all 881 cases on the hosted Node 24.19 two-worker runner. Restore the exact reviewed pre-diagnostic source tree. The original retry error remains nonreproduced; no authentication repair is claimed.
karmafeast pushed a commit to karmaterminal/openclaw that referenced this pull request Sep 26, 2026
Follow-up to the b1c68b9 back-merge (c2c131b). Every change here is a
consequence of that absorb; the per-hunk journal lives on #1396.

Measured baselines (measure, never derive):
- config baseline: core 2480 = our +17 continuation surface (base/upstream
  2463); channel 3742 and plugin 4349 are upstream's exactly.
- plugin SDK surface: 4592 public / 2693 callable = upstream's measured
  4580/2688 plus our unchanged +12/+5.

Upstream contract adoption:
- openclaw#157977: compaction requires host source authority. Both continuation
  request_compaction callers now pass the requesting run's own admission
  (command attempt: opts.operatorAuthority; reply turn:
  followupRun.operatorAuthority), never an undefined System-work source.
- TypeScript 7 (native): our AST tests and the continuation guard-callsite
  script move to typescript/unstable/ast and the native parser owner. The
  guard script was runtime-broken by the bump; it now pins 22 call sites.
- task-flow store: private copies of bind/upsert/read that shadowed the
  kernel owner (and dropped chain_id on conflict) are removed; the kernel
  owns them.

Semantic test conflicts fixed across registry, maintenance, reply and codex
tests (typed ownership results, upstream fixtures, required fields). The
reply-path compaction test now asserts the compaction source authority.

Known red, deliberately not papered over: volatile-map-allowlist (#1398) —
stale since 2026-09-20 on the pre-absorb candidate, needs reviewed entries.

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

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: codex extensions: copilot gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. security-sensitive-changed size: XL 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