Repository navigation
Conversation
iamtoruk
added a commit
that referenced
this pull request
Oct 10, 2026
…nd follow-ups (#1733) * fix(pr): a subagent whose description names a PR folds into that PR A subagent run folded into whatever PR its parent's last pr-link carried, so review runs for #1703, #1712, #1728 and #1729 landed on a stale closed #24. The Agent description ("Review PR 1729 ...") is now read from the subagent's .meta.json at report time; a single PR it names outranks the carried PR. * fix(pr): date each PR by its own turns and count its agent runs Every PR row carried the whole session's first and last timestamp, so one long orchestrator session stamped the same span and "1 session" on all of them. Rows now span their first to last attributed turn or folded run, and a new `runs` field counts contributing sessions plus folded subagent runs. * feat(pr): local one-shot, follow-up rounds, review runs, merge time and cost split per PR Each PR row now carries signals read from cached commands, no GitHub calls: openedAt (gh pr create paired with the PR's first pr-link), follow-up rounds (pushes naming its --head branch, or from a run whose description names it, in 10-minute bursts), oneShot only when the open and its branch were seen, reviewRuns and reviewCostUSD, mergedAt and timeToMergeMs, a build/review/fixes cost split that sums to the row, and linkEvidence to flag pr-link-only rows. * feat(session-why): PRs the session opened, their follow-up rounds and review runs The why view now carries prWork: each gh pr create whose output printed a PR URL, the pushes after it on its --head branch (or from a helper whose description names that PR) in 10-minute rounds, and the helpers that read a PR without committing or pushing, with their cost. * perf(pr): only parse commands that can name a push or a PR * feat(app): local PR facts on PR cards and PR work in the session view Each PR card gets one line of facts from the CLI's local signals: the review run and its cost, one shot or follow-up rounds, and merge time after open. Unknowns are left out; a pr-link-only row says so. The count shows agent runs instead of sessions. The expanded card splits spend into building, review runs and after first review, and lists the review runs. The session view lists the PRs it opened and the review runs it spawned. * perf(pr): read subagent descriptions only for PR attribution Every report, status and menubar refresh read each subagent's .meta.json (about 2,000 files in 30 days) and the cross-provider correlation scanned every folded run's commands for PR signals it never uses. Sessions now carry the sidecar path; the description is read on demand, memoized by mtime, only for folded runs and runs that push, and correlation skips the command scan. The by-pr footer now counts runs to match the Runs column.
uttamdeb
force-pushed
the
fix/openclaw-state-dir
branch
from
October 10, 2026 20:48
a35a5fa to
d839350
Compare
uttamdeb
force-pushed
the
fix/openclaw-state-dir
branch
from
October 14, 2026 05:42
d839350 to
e412692
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OPENCLAW_STATE_DIR/agentsand resolveOPENCLAW_HOMEusing OpenClaw's home precedence and fallbacks. Preserve explicit constructor paths and the four historical roots.Rebased on upstream
9a40cc60. Upstream's Copilot v75 migration and guarded rederive threshold are preserved. The original eleven commits are retained; one additional commit covers migration from v75 and updates the documentation. Final head:e4126922.Data provenance and validation scope
The JSONL and SQLite regression tests use controlled fixtures. There is no live OpenClaw installation on this test machine, so I am not claiming validation against one.
For additional evidence, I replayed the timestamped assistant-event excerpt that an OpenClaw user published in openclaw/openclaw#26645. The report identifies OpenClaw 2026.2.23 and a Kimi K2.5 session. JSON comments/whitespace were normalized; the published event fields, including timestamp, model, usage, and logged cost, were retained. The excerpt was placed under an isolated relocated agents directory; it contains no prompt or response text.
That source reports a vendor-side input-underreporting problem. This replay validates discovery and preservation of the recorded fields, not API billing accuracy or a full live installation. The maintainer's real-world validation request remains for review; this is supplemental evidence with explicit provenance.
CLI before and after
Command on each checkout, with isolated HOME/config/cache paths and
OPENCLAW_STATE_DIRselecting the copied excerpt:9a40cc60e4126922The branch's CLI also reports the model as Kimi K2.5. Its session-count basis is marked partial, consistent with replaying one excerpt rather than a complete session. Direct provider checks confirm that the explicit constructor reads the same event on both checkouts, while default discovery finds it only on this branch. Assertions compare the parsed fields against the source event.
The separate controlled JSONL reproduction also retains its original result: main discovers 0 default sessions / 1 explicit session; the branch discovers 1 / 1, preserving the fixture's 12,345 input and 678 output tokens.
The resolver follows OpenClaw's state resolver, home normalization, and required-home fallback.
Cache and regression coverage
OPENCLAW_STATE_DIR,OPENCLAW_HOME, or cwd under a relative override. Partial parses retain the prior fingerprint and retry; unchanged roots reuse history.Testing / Verification
Node 24.9.0, unchanged upstream
9a40cc60, exact final branch heade4126922:npm run build,npx tsc --noEmit, andgit diff --checkpassed.Full suites on main and branch used the normal npm test scope:
The two full runs ran concurrently. Selected failures were then rerun serially with
--maxWorkers 1after both full runs finished, using-tto select the failed cases. The four serial refresh-lock suites remain excluded by the repository's normalnpm testscript. No Electron or native-app code is changed.This is an existing-provider discovery fix. No original user logs are modified or deleted.