Skip to content

fix(post-compaction): support H1 headings in extractSections#67090

Closed
xiaoyu-157 wants to merge 1 commit into
openclaw:mainfrom
xiaoyu-157:fix/extract-sections-h1-support
Closed

fix(post-compaction): support H1 headings in extractSections#67090
xiaoyu-157 wants to merge 1 commit into
openclaw:mainfrom
xiaoyu-157:fix/extract-sections-h1-support

Conversation

@xiaoyu-157

Copy link
Copy Markdown

Summary

extractSections in post-compaction-context.ts used the regex
/^(#{2,3})\s+(.+?)\s*$/ which only matched H2 (##) and H3 (###)
headings. When a user writes their AGENTS.md with top-level H1 sections —
a very natural choice, e.g. # Session Startup — the function silently
returns [] and readPostCompactionContext returns null.

The result: after every compaction, the agent loses all injected critical
instructions with zero warning to the user. The bug is particularly
insidious because the AGENTS.md template and docs do not enforce a
specific heading level.

Fix

Change the regex quantifier from {2,3} to {1,4} to accept H1
through H4 headings. The boundary termination logic (level <= sectionLevel)
already handles nesting correctly for any level — no further changes needed.

Testing

Added four new test cases:

  • H1 section matching – verifies # Session Startup is now extracted
  • H4 section matching – verifies #### Session Startup is extracted
  • H1 boundary termination – verifies a subsequent H1 ends the section
  • H1 with H2/H3 sub-headings – verifies nested headings are included

All existing tests continue to pass.

Impact

  • Zero breaking changes; existing H2/H3 behavior is unchanged
  • No config changes required
  • Fixes a silent failure path that would cause any deployment using H1
    headings in AGENTS.md to lose post-compaction context injection

@greptile-apps

greptile-apps Bot commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a silent failure in extractSections (post-compaction-context.ts) where the heading regex {2,3} only matched H2–H3, causing deployments with H1-headed AGENTS.md sections to lose all post-compaction context injection. The fix widens the quantifier to {1,4} (H1–H4); the existing boundary-termination logic (level <= sectionLevel) already generalizes correctly to any heading depth, so no further changes are needed. Four well-targeted regression tests cover the new H1/H4 paths, boundary termination, and nested sub-headings. Existing H2/H3 behavior is unchanged.

Confidence Score: 5/5

Safe to merge — minimal, targeted regex fix with correct boundary logic and good test coverage.

The change is a single-character quantifier adjustment that is fully additive. The default template uses H2 headings, so no existing deployment is broken. The boundary termination logic was already generalized, and all four new test cases correctly exercise the H1/H4 paths including nesting and termination. No P0 or P1 findings.

No files require special attention.

Reviews (1): Last reviewed commit: "fix(post-compaction): support H1 heading..." | Re-trigger Greptile

@sliverp

sliverp commented Apr 15, 2026

Copy link
Copy Markdown
Member

@xiaoyu-157 Thanks for the fix attempt. Looking through the current code and docs, my reading is that the H2/H3 behavior here was intentional rather than an accidental omission.

Right now this path is documented as extracting H2/H3 section names from AGENTS.md, and the shipped templates also use # for the document title with ## Session Startup / ## Red Lines as the extractable sections. So before we widen this parser, I want to understand the concrete case you’re trying to support.

What AGENTS.md shape are you seeing in practice that needs H1 here? Was this from a real generated workspace / user workspace that broke after compaction, or is this based on a hypothetical Markdown layout? And separately, why expand to H4 as well instead of making the narrowest change needed?

@hxy91819 hxy91819 assigned hxy91819 and unassigned hxy91819 Apr 15, 2026
@clawsweeper

clawsweeper Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

Latest ClawSweeper review: 2026-05-19 22:39 UTC / May 19, 2026, 6:39 PM ET.

Workflow note: Future ClawSweeper reviews update this same comment in place.

How this review workflow works
  • 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.

Summary
The branch changes extractSections to match H1-H4 Markdown headings and adds tests for H1/H4 extraction plus H1 section boundaries and nesting.

Reproducibility: yes. for source-level parser behavior: current main matches only H2/H3, so H1/H4 headings are skipped. No for a high-confidence product bug, because the docs/help/template define H2/H3 and no real H1 workspace was supplied.

PR rating
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🦐 gold shrimp
Summary: The patch is small and plausible, but missing real behavior proof plus an unresolved contract mismatch make it not merge-ready.

Rank-up moves:

  • Add after-fix real setup proof, such as redacted terminal output or logs showing a compaction path with the intended heading shape.
  • Answer the reviewer question about the real H1 case and why H4 should be included.
  • If maintainers accept broader heading support, update docs, typed comments, generated help, and tests together.
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

Real behavior proof
Needs real behavior proof before merge: The PR body and comments provide tests and bot review only, with no after-fix real setup proof; proof should be redacted and can be terminal output, logs, recording, screenshot, or linked artifact. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • Merging as-is would let H1/H4 headings matching configured section names start injecting post-compaction context even though current docs, typed comments, and generated help only promise H2/H3.
  • The H4 expansion is broader than the stated H1 case and has no maintainer-approved compatibility contract.
  • The PR has unit-test additions but no after-fix terminal/live output, logs, recording, screenshot, or artifact from a real compaction setup.
  • The broader post-compaction AGENTS.md parsing/session-state policy issue remains open at [Bug]: #18049 introduces session bloat #45488.

Maintainer options:

  1. Align the heading contract first (recommended)
    Have a maintainer choose the supported heading levels, then update parser behavior, tests, docs, typed comments, and generated help together before merge.
  2. Keep H2/H3 unless evidence appears
    If no real H1 workspace case is provided, maintainers can pause or close this PR and keep the current documented H2/H3 behavior.
  3. Accept broader matching explicitly
    Maintainers may intentionally accept H1-H4 parsing, but should own the session-context behavior change and require real upgrade/runtime proof.

Next step before merge
Needs maintainer judgment on the supported AGENTS.md heading-level contract plus contributor real behavior proof; automation should not decide H1/H4 policy.

Security
Cleared: The diff is limited to Markdown heading parsing comments/regex and colocated tests, with no dependency, workflow, secret, package, install, or code-execution surface changes.

Review findings

  • [P2] Align parser widening with the documented contract — src/auto-reply/reply/post-compaction-context.ts:208
Review details

Best possible solution:

End with a maintainer-approved heading-level contract where parser behavior, regression tests, config comments, generated help/schema text, and public docs agree; if a real H1 case is accepted, keep the accepted levels narrow and prove the runtime compaction path.

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

Yes for source-level parser behavior: current main matches only H2/H3, so H1/H4 headings are skipped. No for a high-confidence product bug, because the docs/help/template define H2/H3 and no real H1 workspace was supplied.

Is this the best way to solve the issue?

No as proposed. The diff broadens shared runtime behavior to H1-H4 without settling the heading-level policy or updating all contract surfaces, so the safer path is maintainer approval followed by aligned code, docs, and proof.

Label justifications:

  • P2: This is a normal-priority parser/runtime compatibility change with limited blast radius but a real session-context contract decision.
  • merge-risk: 🚨 compatibility: The PR changes which AGENTS.md heading levels are recognized while docs, typed comments, and generated help still define H2/H3.
  • merge-risk: 🚨 session-state: The parser controls injected post-compaction context, so broader matching can change what guidance an agent receives after compaction.
  • rating: 🧂 unranked krab: Current PR rating is 🧂 unranked krab because proof is 🧂 unranked krab, patch quality is 🦐 gold shrimp, and The patch is small and plausible, but missing real behavior proof plus an unresolved contract mismatch make it not merge-ready.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body and comments provide tests and bot review only, with no after-fix real setup proof; proof should be redacted and can be terminal output, logs, recording, screenshot, or linked artifact. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Full review comments:

  • [P2] Align parser widening with the documented contract — src/auto-reply/reply/post-compaction-context.ts:208
    This line changes the shared extractor to accept H1-H4, but current docs, typed config comments, generated help, the summary injection comments, and the shipped template still define H2/H3 section extraction, and the reviewer’s real-workspace/H4 scope question is unanswered. Settle the supported heading levels and update those contract surfaces, or keep H2/H3.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.9

What I checked:

Likely related people:

  • 康熙: Authored the original post-compaction workspace context injection and the follow-up extraction robustness work that established H2/H3 parsing. (role: introduced behavior; confidence: high; commits: 35a3e1b788d6, d0b33f23eb6a; files: src/auto-reply/reply/post-compaction-context.ts, src/auto-reply/reply/post-compaction-context.test.ts, src/auto-reply/reply/agent-runner.ts)
  • efe-arv: Authored the merged configurable post-compaction section work that added the documented H2/H3 config/help surface. (role: config contract contributor; confidence: high; commits: 03b9abab8486, 8aa0137b9b8d; files: src/auto-reply/reply/post-compaction-context.ts, src/config/types.agent-defaults.ts, src/config/schema.help.ts)
  • echoVic: Authored the merged AGENTS.md template/default-heading alignment that uses an H1 document title with H2 extractable sections. (role: adjacent template contributor; confidence: medium; commits: 96021a2b175b, ac17729161ba; files: docs/reference/templates/AGENTS.md, src/auto-reply/reply/post-compaction-context.ts, src/auto-reply/reply/post-compaction-context.test.ts)
  • sliverp: Asked the still-unanswered review question about the real H1 workspace case and the rationale for H4 expansion. (role: reviewer; confidence: high; files: src/auto-reply/reply/post-compaction-context.ts, docs/gateway/config-agents.md, docs/reference/templates/AGENTS.md)

Codex review notes: model gpt-5.5, reasoning high; reviewed against ecb6da9289b1.

@clawsweeper

clawsweeper Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes:

This PR widens post-compaction AGENTS.md section extraction from H2/H3 headings to H1-H4 headings and adds regression tests for H1/H4 matching plus H1 section boundaries and nested headings.

Maintainer follow-up before merge:

This is an open implementation PR with a small code diff, but the remaining blocker is maintainer judgment on whether to broaden the documented H2/H3 parser contract to H1 and possibly H4; an automated replacement PR should not decide that contract.

Review details

Best possible solution:

End with a maintainer-approved heading-level contract where parser behavior, regression tests, config comments, generated help/schema text, and public docs agree. If a real H1 workspace case is accepted, narrow the implementation to the intended levels and update those surfaces together; otherwise retain the documented H2/H3 behavior and close manually as not planned.

Acceptance criteria:

  • pnpm test src/auto-reply/reply/post-compaction-context.test.ts
  • pnpm config:docs:check
  • pnpm exec oxfmt --check --threads=1 src/auto-reply/reply/post-compaction-context.ts src/auto-reply/reply/post-compaction-context.test.ts docs/gateway/config-agents.md src/config/types.agent-defaults.ts src/config/schema.help.ts src/config/schema.base.generated.ts

What I checked:

Likely related people:

  • 康熙: Introduced post-compaction workspace context injection and then tightened section extraction to the current H2/H3-aware parser behavior. (role: introduced behavior; confidence: high; commits: 35a3e1b788d6, d0b33f23eb6a; files: src/auto-reply/reply/post-compaction-context.ts, src/auto-reply/reply/post-compaction-context.test.ts, src/auto-reply/reply/agent-runner.ts)
  • efe-arv: Added configurable post-compaction section names and the H2/H3 config/help contract in the compaction configuration surface. (role: introduced config contract; confidence: high; commits: 03b9abab8486; files: src/auto-reply/reply/post-compaction-context.ts, src/auto-reply/reply/post-compaction-context.test.ts, src/config/types.agent-defaults.ts)
  • echoVic: Aligned the AGENTS.md template section names with the post-compaction extraction defaults, which is central to the current H1 title plus H2 section shape. (role: adjacent template owner; confidence: medium; commits: 96021a2b175b; files: docs/reference/templates/AGENTS.md, src/auto-reply/reply/post-compaction-context.ts, src/auto-reply/reply/post-compaction-context.test.ts)
  • sliverp: Asked the unresolved review question about the real H1 workspace case and the rationale for H4 expansion, so they are the clearest follow-up route for this PR decision. (role: maintainer reviewer; confidence: high; files: src/auto-reply/reply/post-compaction-context.ts, docs/gateway/config-agents.md, docs/reference/templates/AGENTS.md)

Remaining risk / open question:

  • No concrete generated or user workspace with # Session Startup has been provided after the maintainer asked for that evidence.
  • The H4 expansion is broader than the stated H1 problem and would broaden a documented H2/H3 contract without docs, config comments, or generated schema/help updates.
  • Closing or replacing the PR now would preempt the pending maintainer decision on the intended heading-level compatibility contract.

Codex review notes: model gpt-5.5, reasoning high; reviewed against acae48b790fa.

@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. labels May 19, 2026
@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. label May 19, 2026
@clawsweeper

clawsweeper Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat.

Where did the egg go?
  • The egg game starts only after the PR passes the real-behavior proof check.
  • Before that, no creature or rarity is rolled. The treat waits for real proof.
  • This is still just collectible flavor: proof affects review readiness, not creature quality.

@BunsDev

BunsDev commented May 24, 2026

Copy link
Copy Markdown
Contributor

Maintainer note: this overlaps the same post-compaction AGENTS.md surface as #45488, but it does not resolve the default-policy/session-bloat part of the report. Broadening heading extraction would keep the reinjection behavior enabled by default.

I opened #85960 as the replacement path: post-compaction AGENTS.md reinjection becomes explicit opt-in, while configured users keep section extraction and the legacy fallback behavior. Treating this PR as superseded/not aligned once #85960 lands; not marking it as an exact duplicate of the implementation because the fix direction is different.

BunsDev added a commit that referenced this pull request May 25, 2026
Summary:
- Make post-compaction AGENTS.md reinjection explicit opt-in for configured sections.
- Carry the run workspace into compaction-safeguard AGENTS.md reads.
- Improve collapsed Control UI tool rows while preserving raw expanded tool details.

Verification:
- CI green on PR head 9610166.
- pnpm exec oxfmt --check --threads=1 <changed files>
- OPENCLAW_OXLINT_SKIP_PREPARE=1 node scripts/run-oxlint.mjs <changed ts/mjs files>
- node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test.tsbuildinfo
- git diff --check origin/main...HEAD && git diff --check
- node scripts/run-vitest.mjs src/agents/pi-hooks/compaction-safeguard.test.ts src/agents/pi-embedded-runner/extensions.test.ts -t "workspace"
- node scripts/run-vitest.mjs src/auto-reply/reply/agent-runner.misc.runreplyagent.test.ts -t "reads opted-in post-compaction context"
- node scripts/run-vitest.mjs test/scripts/test-projects.test.ts -t "allows explicit split Vitest config targets"
- node scripts/run-vitest.mjs ui/src/ui/chat/tool-cards.test.ts ui/src/ui/chat/tool-cards.node.test.ts ui/src/ui/chat/grouped-render.test.ts ui/src/styles/chat/tool-cards.test.ts
- AUTOREVIEW_AUTO_TESTS=0 .agents/skills/autoreview/scripts/autoreview --mode branch

Fixes #45488.
Fixes #45649.
Supersedes #67090.
@BunsDev

BunsDev commented May 25, 2026

Copy link
Copy Markdown
Contributor

Closing this as superseded by #85960, which landed the maintainer-approved policy fix: post-compaction AGENTS.md reinjection is now explicit opt-in, and configured users keep section extraction/legacy fallback behavior.

This PR is not an exact duplicate because it broadens heading extraction, but it does not resolve the default-policy/session-bloat concern from #45488 and would keep reinjection enabled by default. New evidence for broader heading support can come back as a separate, explicitly scoped proposal with docs/config help aligned.

@BunsDev BunsDev closed this May 25, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 26, 2026
Summary:
- Make post-compaction AGENTS.md reinjection explicit opt-in for configured sections.
- Carry the run workspace into compaction-safeguard AGENTS.md reads.
- Improve collapsed Control UI tool rows while preserving raw expanded tool details.

Verification:
- CI green on PR head 9610166.
- pnpm exec oxfmt --check --threads=1 <changed files>
- OPENCLAW_OXLINT_SKIP_PREPARE=1 node scripts/run-oxlint.mjs <changed ts/mjs files>
- node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test.tsbuildinfo
- git diff --check origin/main...HEAD && git diff --check
- node scripts/run-vitest.mjs src/agents/pi-hooks/compaction-safeguard.test.ts src/agents/pi-embedded-runner/extensions.test.ts -t "workspace"
- node scripts/run-vitest.mjs src/auto-reply/reply/agent-runner.misc.runreplyagent.test.ts -t "reads opted-in post-compaction context"
- node scripts/run-vitest.mjs test/scripts/test-projects.test.ts -t "allows explicit split Vitest config targets"
- node scripts/run-vitest.mjs ui/src/ui/chat/tool-cards.test.ts ui/src/ui/chat/tool-cards.node.test.ts ui/src/ui/chat/grouped-render.test.ts ui/src/styles/chat/tool-cards.test.ts
- AUTOREVIEW_AUTO_TESTS=0 .agents/skills/autoreview/scripts/autoreview --mode branch

Fixes openclaw#45488.
Fixes openclaw#45649.
Supersedes openclaw#67090.
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
Summary:
- Make post-compaction AGENTS.md reinjection explicit opt-in for configured sections.
- Carry the run workspace into compaction-safeguard AGENTS.md reads.
- Improve collapsed Control UI tool rows while preserving raw expanded tool details.

Verification:
- CI green on PR head 9610166.
- pnpm exec oxfmt --check --threads=1 <changed files>
- OPENCLAW_OXLINT_SKIP_PREPARE=1 node scripts/run-oxlint.mjs <changed ts/mjs files>
- node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test.tsbuildinfo
- git diff --check origin/main...HEAD && git diff --check
- node scripts/run-vitest.mjs src/agents/pi-hooks/compaction-safeguard.test.ts src/agents/pi-embedded-runner/extensions.test.ts -t "workspace"
- node scripts/run-vitest.mjs src/auto-reply/reply/agent-runner.misc.runreplyagent.test.ts -t "reads opted-in post-compaction context"
- node scripts/run-vitest.mjs test/scripts/test-projects.test.ts -t "allows explicit split Vitest config targets"
- node scripts/run-vitest.mjs ui/src/ui/chat/tool-cards.test.ts ui/src/ui/chat/tool-cards.node.test.ts ui/src/ui/chat/grouped-render.test.ts ui/src/styles/chat/tool-cards.test.ts
- AUTOREVIEW_AUTO_TESTS=0 .agents/skills/autoreview/scripts/autoreview --mode branch

Fixes openclaw#45488.
Fixes openclaw#45649.
Supersedes openclaw#67090.
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
Summary:
- Make post-compaction AGENTS.md reinjection explicit opt-in for configured sections.
- Carry the run workspace into compaction-safeguard AGENTS.md reads.
- Improve collapsed Control UI tool rows while preserving raw expanded tool details.

Verification:
- CI green on PR head 9610166.
- pnpm exec oxfmt --check --threads=1 <changed files>
- OPENCLAW_OXLINT_SKIP_PREPARE=1 node scripts/run-oxlint.mjs <changed ts/mjs files>
- node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test.tsbuildinfo
- git diff --check origin/main...HEAD && git diff --check
- node scripts/run-vitest.mjs src/agents/pi-hooks/compaction-safeguard.test.ts src/agents/pi-embedded-runner/extensions.test.ts -t "workspace"
- node scripts/run-vitest.mjs src/auto-reply/reply/agent-runner.misc.runreplyagent.test.ts -t "reads opted-in post-compaction context"
- node scripts/run-vitest.mjs test/scripts/test-projects.test.ts -t "allows explicit split Vitest config targets"
- node scripts/run-vitest.mjs ui/src/ui/chat/tool-cards.test.ts ui/src/ui/chat/tool-cards.node.test.ts ui/src/ui/chat/grouped-render.test.ts ui/src/styles/chat/tool-cards.test.ts
- AUTOREVIEW_AUTO_TESTS=0 .agents/skills/autoreview/scripts/autoreview --mode branch

Fixes openclaw#45488.
Fixes openclaw#45649.
Supersedes openclaw#67090.
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
Summary:
- Make post-compaction AGENTS.md reinjection explicit opt-in for configured sections.
- Carry the run workspace into compaction-safeguard AGENTS.md reads.
- Improve collapsed Control UI tool rows while preserving raw expanded tool details.

Verification:
- CI green on PR head 9610166.
- pnpm exec oxfmt --check --threads=1 <changed files>
- OPENCLAW_OXLINT_SKIP_PREPARE=1 node scripts/run-oxlint.mjs <changed ts/mjs files>
- node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test.tsbuildinfo
- git diff --check origin/main...HEAD && git diff --check
- node scripts/run-vitest.mjs src/agents/pi-hooks/compaction-safeguard.test.ts src/agents/pi-embedded-runner/extensions.test.ts -t "workspace"
- node scripts/run-vitest.mjs src/auto-reply/reply/agent-runner.misc.runreplyagent.test.ts -t "reads opted-in post-compaction context"
- node scripts/run-vitest.mjs test/scripts/test-projects.test.ts -t "allows explicit split Vitest config targets"
- node scripts/run-vitest.mjs ui/src/ui/chat/tool-cards.test.ts ui/src/ui/chat/tool-cards.node.test.ts ui/src/ui/chat/grouped-render.test.ts ui/src/styles/chat/tool-cards.test.ts
- AUTOREVIEW_AUTO_TESTS=0 .agents/skills/autoreview/scripts/autoreview --mode branch

Fixes openclaw#45488.
Fixes openclaw#45649.
Supersedes openclaw#67090.
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
Summary:
- Make post-compaction AGENTS.md reinjection explicit opt-in for configured sections.
- Carry the run workspace into compaction-safeguard AGENTS.md reads.
- Improve collapsed Control UI tool rows while preserving raw expanded tool details.

Verification:
- CI green on PR head 9610166.
- pnpm exec oxfmt --check --threads=1 <changed files>
- OPENCLAW_OXLINT_SKIP_PREPARE=1 node scripts/run-oxlint.mjs <changed ts/mjs files>
- node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test.tsbuildinfo
- git diff --check origin/main...HEAD && git diff --check
- node scripts/run-vitest.mjs src/agents/pi-hooks/compaction-safeguard.test.ts src/agents/pi-embedded-runner/extensions.test.ts -t "workspace"
- node scripts/run-vitest.mjs src/auto-reply/reply/agent-runner.misc.runreplyagent.test.ts -t "reads opted-in post-compaction context"
- node scripts/run-vitest.mjs test/scripts/test-projects.test.ts -t "allows explicit split Vitest config targets"
- node scripts/run-vitest.mjs ui/src/ui/chat/tool-cards.test.ts ui/src/ui/chat/tool-cards.node.test.ts ui/src/ui/chat/grouped-render.test.ts ui/src/styles/chat/tool-cards.test.ts
- AUTOREVIEW_AUTO_TESTS=0 .agents/skills/autoreview/scripts/autoreview --mode branch

Fixes openclaw#45488.
Fixes openclaw#45649.
Supersedes openclaw#67090.
SYU8384 pushed a commit to SYU8384/openclaw that referenced this pull request Jun 3, 2026
Summary:
- Make post-compaction AGENTS.md reinjection explicit opt-in for configured sections.
- Carry the run workspace into compaction-safeguard AGENTS.md reads.
- Improve collapsed Control UI tool rows while preserving raw expanded tool details.

Verification:
- CI green on PR head 9610166.
- pnpm exec oxfmt --check --threads=1 <changed files>
- OPENCLAW_OXLINT_SKIP_PREPARE=1 node scripts/run-oxlint.mjs <changed ts/mjs files>
- node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test.tsbuildinfo
- git diff --check origin/main...HEAD && git diff --check
- node scripts/run-vitest.mjs src/agents/pi-hooks/compaction-safeguard.test.ts src/agents/pi-embedded-runner/extensions.test.ts -t "workspace"
- node scripts/run-vitest.mjs src/auto-reply/reply/agent-runner.misc.runreplyagent.test.ts -t "reads opted-in post-compaction context"
- node scripts/run-vitest.mjs test/scripts/test-projects.test.ts -t "allows explicit split Vitest config targets"
- node scripts/run-vitest.mjs ui/src/ui/chat/tool-cards.test.ts ui/src/ui/chat/tool-cards.node.test.ts ui/src/ui/chat/grouped-render.test.ts ui/src/styles/chat/tool-cards.test.ts
- AUTOREVIEW_AUTO_TESTS=0 .agents/skills/autoreview/scripts/autoreview --mode branch

Fixes openclaw#45488.
Fixes openclaw#45649.
Supersedes openclaw#67090.
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
Summary:
- Make post-compaction AGENTS.md reinjection explicit opt-in for configured sections.
- Carry the run workspace into compaction-safeguard AGENTS.md reads.
- Improve collapsed Control UI tool rows while preserving raw expanded tool details.

Verification:
- CI green on PR head 9610166.
- pnpm exec oxfmt --check --threads=1 <changed files>
- OPENCLAW_OXLINT_SKIP_PREPARE=1 node scripts/run-oxlint.mjs <changed ts/mjs files>
- node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test.tsbuildinfo
- git diff --check origin/main...HEAD && git diff --check
- node scripts/run-vitest.mjs src/agents/pi-hooks/compaction-safeguard.test.ts src/agents/pi-embedded-runner/extensions.test.ts -t "workspace"
- node scripts/run-vitest.mjs src/auto-reply/reply/agent-runner.misc.runreplyagent.test.ts -t "reads opted-in post-compaction context"
- node scripts/run-vitest.mjs test/scripts/test-projects.test.ts -t "allows explicit split Vitest config targets"
- node scripts/run-vitest.mjs ui/src/ui/chat/tool-cards.test.ts ui/src/ui/chat/tool-cards.node.test.ts ui/src/ui/chat/grouped-render.test.ts ui/src/styles/chat/tool-cards.test.ts
- AUTOREVIEW_AUTO_TESTS=0 .agents/skills/autoreview/scripts/autoreview --mode branch

Fixes openclaw#45488.
Fixes openclaw#45649.
Supersedes openclaw#67090.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants