Skip to content

perf(workers): skip configured Git author lookups - #146833

Merged
vincentkoc merged 2 commits into
mainfrom
perf/cloud-workspace-author-lookups-20260913
Sep 13, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
perf/cloud-workspace-author-lookups-20260913

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Workspace sync launches local git config lookups even when the request already supplies the corresponding author fields.

Solution

Resolve only missing author fields in the shared workspace-sync owner. Node-worker and SSH workspace paths retain the same validation and remote Git configuration behavior.

This head reconstructs the intended three-file change on current main and drops the unrelated Crabbox stack, which already landed through #146816.

User Impact

Fully configured identities launch zero local author lookups. Partially configured identities launch one lookup, and fully inherited identities retain both lookups.

Evidence

  • Candidate focused tests: 25/25 passed in 7.54s.
  • Baseline proof with only the production hunk reverted: 5 intended failures. Configured-name and configured-email cases performed 2 lookups instead of 1; fully configured node and tunnel paths performed 2 instead of 0.
  • Same-host per-file benchmark with both revisions passing:
    • node-worker-workspace-fallback.test.ts: baseline 15/15 in 1.66s; candidate 16/16 in 2.88s.
    • workspace-sync-tunnel.test.ts: baseline 9/9 in 5.00s; candidate 9/9 in 6.21s.
  • Remote workspace assertions still observe the configured name and email after transfer convergence.
  • git diff --check
  • Patch identity matches the independently reviewed repair commit.
  • Prior scoped autoreview found no actionable issue.

Production is +5/-5 (net zero). Tests are +48/-22. The file timings include added assertions and do not establish an end-to-end latency improvement; the deterministic metric is the reduced subprocess count.

Local check:changed passed conflict, ratchet, dependency, and formatting lanes, then stopped because the shared ordinary-worktree dependency link did not expose import-meta-resolve. Exact-head CI and a refreshed ClawSweeper review remain required before merge.

@vincentkoc vincentkoc self-assigned this Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 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 gateway Gateway runtime size: S maintainer Maintainer-authored PR labels Sep 13, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review September 13, 2026 07:13
Base automatically changed from perf/cloud-desktop-renderer-reuse-20260913 to main September 13, 2026 07:21
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 7:00 AM ET / 11:00 UTC (Revision 5).

ClawSweeper review

What this changes

Worker workspace synchronization skips local Git lookups for explicitly supplied author fields while retaining inheritance for missing fields.

Merge readiness

✅ Ready for maintainer review

The optimization remains useful and introduces no actionable correctness defect. Current main and the latest release still perform both lookups; the related merged work preserves author identity but does not eliminate these redundant subprocesses.

Priority: P3
Reviewed head: 76f97bf187b1eb45ca99b4eacf383f3a1bd77f23

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable optimization with meaningful fail-first coverage and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor gate does not apply to this MEMBER-authored optimization, and no authority boundary changes. Supplied owner-boundary tests exercise lookup counts and resulting worker Git configuration; their mocked transport is not live SSH proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor gate does not apply to this MEMBER-authored optimization, and no authority boundary changes. Supplied owner-boundary tests exercise lookup counts and resulting worker Git configuration; their mocked transport is not live SSH proof.
Evidence reviewed 7 items Introduced production change: The pinned introduction delta moves the existing nullish fallback inside Promise.all. Supplied fields retain precedence, missing fields retain parallel lookup, and validation and remote configuration are unchanged.
Still necessary on current main: Fetched main unconditionally awaits both local Git config reads before replacing their results with configured values.
Latest release comparison: The v2026.9.4 source also performs both lookups unconditionally. The release blob was read through GitHub after local historical-object inspection failed.
Findings None None.
Security None None.

How this fits together

Gateway workspace synchronization prepares local repositories for node and SSH workers. Its shared author resolver combines configured fields with repository defaults before configuring the worker checkout.

flowchart TD
  A[Workspace sync request] --> B[Shared author resolver]
  B --> C{Field supplied?}
  C -->|Yes| D[Use configured value]
  C -->|No| E[Read local Git config]
  D --> F[Configure worker checkout]
  E --> F
  F --> G[Workspace ready]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source 0, Tests +26. Total +26 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 5 5 0
Tests 2 48 22 +26
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 53 27 +26

Review metrics

Metric Value Why it matters
Local author lookups Fully configured: 2 → 0; partially configured: 2 → 1; inherited: 2 → 2 This is the directly supported performance improvement; the supplied timings do not establish lower end-to-end latency.

Technical review

Best possible solution:

Keep author resolution in the shared owner and launch Git subprocesses only for fields that need inheritance.

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

Yes, source establishes that configured author fields still cause two discarded Git lookups on current main. The supplied fail-first results support that mechanism; this review did not execute tests.

Is this the best way to solve the issue?

Yes. Short-circuiting each existing fallback removes redundant work without introducing another resolver, changing field precedence, or altering remote configuration.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0a6bc07ec391.

Labels

Label justifications:

  • P3: This is a bounded subprocess optimization that preserves the existing worker Git identity contract.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor gate does not apply to this MEMBER-authored optimization, and no authority boundary changes. Supplied owner-boundary tests exercise lookup counts and resulting worker Git configuration; their mocked transport is not live SSH proof.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; 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 (4 earlier review cycles)
  • reviewed 2026-09-13T07:20:42.565Z sha fc32e469c343f5de9b74894abe81af80198939d1 :: blocked before merge. :: none
  • reviewed 2026-09-13T07:27:43.832Z sha fc32e469c343f5de9b74894abe81af80198939d1 :: blocked before merge. :: none
  • reviewed 2026-09-13T08:29:58.804Z sha 4b3f8f8 :: needs changes before merge. :: none
  • reviewed 2026-09-13T08:39:04.959Z sha 4b3f8f8 :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc force-pushed the perf/cloud-workspace-author-lookups-20260913 branch from fc32e46 to 4b3f8f8 Compare September 13, 2026 08:25
@vincentkoc vincentkoc changed the title improve(workers): skip unused Git-author lookups during sync perf(workers): skip configured Git author lookups Sep 13, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

The branch was reconstructed on current main to remove the already-landed Crabbox stack. The live diff is now only the shared resolver and its two focused Gateway test files. Candidate proof is 25/25; reverting only the production hunk produces the five intended lookup-count failures.

@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

The remaining Gateway timing item is now recorded in the PR body with passing baseline and candidate runs for each affected test file on the same host. No wall-clock speedup is claimed; the deterministic improvement is the 2-to-0 or 2-to-1 local subprocess reduction.

@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

* refs/heads/temp/pr-146833: (43 commits)
  fix(memory): preserve newer indexes and disclose automatic rebuild costs (#146908)
  fix: retain route ownership while discovering conversations (#146927)
  refactor: reuse plugin fixture shell runner (#146920)
  fix(worker): stop preparing disabled live previews (#146896)
  fix(runtime): support Bun across tooling suite (#146807)
  chore(i18n): refresh native locales (#146924)
  perf(secrets): limit expiry metadata to transient credentials (#146882)
  fix(ui): preserve queued refreshes during session discovery (#146535)
  test(ui): wait for quiet scrolling and close named file tabs (#146836)
  fix(ui): prevent Usage hour filters from freezing during DST (#146919)
  test(ui): share browser page cleanup across layout fixtures (#146805)
  ci: balance complete PR runtime test groups (#146916)
  improve(infra): reduce scheduling work for session notice bursts (#146818)
  improve: prepare Gateway skill commands asynchronously (#146812)
  improve(agents): skip unused assistant delivery parsing (#146858)
  improve(ui): reuse date formatters across timestamp lists (#146789)
  fix(tests): isolate installer and Docker shell snippets (#146897)
  test(heartbeat): share explicit channel configuration fixtures (#146853)
  fix: retain conversation reply claims through write admission (#146866)
  perf(sessions): bound history reads and stabilize cursor paging (#146770)
  ...
@vincentkoc
vincentkoc merged commit b328513 into main Sep 13, 2026
190 checks passed
@vincentkoc
vincentkoc deleted the perf/cloud-workspace-author-lookups-20260913 branch September 13, 2026 11:15
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit to zachisfine/openclaw that referenced this pull request Sep 13, 2026
* temp/pr-146799: (70 commits)
  test: reuse explicit fallback config fixtures (openclaw#146948)
  fix(computer): return fresh window observations after actions (openclaw#146822)
  refactor(feishu): remove unreachable requester topic selection (openclaw#146904)
  improve(gateway): reduce CPU spent listing agent-owned sessions (openclaw#137745)
  fix(ui): avoid recapturing chat drafts during UI updates (openclaw#146884)
  fix(ui): show system uptime in the debug overlay (openclaw#146960)
  fix(retry): honor waits beyond the native timer limit (openclaw#145718)
  fix(ui): keep chat history idle when run status changes (openclaw#146802)
  fix(ui): reuse persisted text during chat streaming (openclaw#146831)
  refactor(qa): share harness drift result construction (openclaw#146903)
  test(agents): coordinate settings lock contention (openclaw#146949)
  fix(worker): avoid repeatedly serializing screenshot history (openclaw#146907)
  fix(secrets): stop buffered upload writes after cancellation (openclaw#146840)
  perf(doctor): avoid unnecessary state runtime imports (openclaw#146926)
  improve: reduce compaction request estimation work (openclaw#146961)
  fix(ci): wait for forwarded avatar imports before assertions (openclaw#146729)
  perf(workers): skip configured Git author lookups (openclaw#146833)
  fix: admit borrowed memory writes through the agent database owner (openclaw#146760)
  fix(discord): prevent voice playback gaps and stale turn controls (openclaw#146798)
  improve: reduce worktree filesystem stalls and archive syncs (openclaw#146906)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit 'ccfd2377cd07d1ad3a583ba64d08e29a065f7061': (1587 commits)
  fix(ui): avoid recapturing chat drafts during UI updates (#146884)
  fix(ui): show system uptime in the debug overlay (#146960)
  fix(retry): honor waits beyond the native timer limit (#145718)
  fix(ui): keep chat history idle when run status changes (#146802)
  fix(ui): reuse persisted text during chat streaming (#146831)
  refactor(qa): share harness drift result construction (#146903)
  test(agents): coordinate settings lock contention (#146949)
  fix(worker): avoid repeatedly serializing screenshot history (#146907)
  fix(secrets): stop buffered upload writes after cancellation (#146840)
  perf(doctor): avoid unnecessary state runtime imports (#146926)
  improve: reduce compaction request estimation work (#146961)
  fix(ci): wait for forwarded avatar imports before assertions (#146729)
  perf(workers): skip configured Git author lookups (#146833)
  fix: admit borrowed memory writes through the agent database owner (#146760)
  fix(discord): prevent voice playback gaps and stale turn controls (#146798)
  improve: reduce worktree filesystem stalls and archive syncs (#146906)
  fix(ui): avoid extra chat rail work while replies stream (#146883)
  improve(ui): speed up populated Usage timelines (#146947)
  test(gateway): retain auth recovery failure diagnostics (#146925)
  fix(tests): create private temporary home directories (#146931)
  ...

# Conflicts:
#	test/tsconfig/tsconfig.core.test.agents-other.json
#	test/tsconfig/tsconfig.core.test.agents-root.json
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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