Skip to content

fix(ci): assign secrets tests to one shard - #148933

Closed
vincentkoc wants to merge 1 commit into
mainfrom
fix/ci-secrets-test-shard-owner-20260915
Closed

vincentkoc wants to merge 1 commit into
mainfrom
fix/ci-secrets-test-shard-owner-20260915

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Related: #148885 and #148889.

What Problem This Solves

Main CI's core test boundary check fails because 83 secrets test roots are assigned to both agents-tools and state-logging. A later shard change duplicated the earlier move.

User Impact

No runtime change. Restores the existing CI check while preserving test coverage and shard limits.

Why This Change Was Made

Keep agents-tools as the sole owner of secrets tests, as confirmed in the maintainer discussion. Remove only the two duplicate include lines from state-logging. Production delta: zero; one test configuration file, two deleted lines.

Evidence

  • Exact PR head: d14f731e5e14a95ccde27efb483343711a7314f1. Current CI attempt 2 and its new aggregate gate passed.
  • The full executable compiler boundary check passed. Core test-type stripes 1/5 and 2/5 and stripes 3/5 and 4/5 passed, including agents-tools and state-logging. This does not claim all 19 compiler shards executed.
  • TypeScript 6.0.3 static config expansion covers all 10,603 roots exactly once across 19 shards, with no missing/extra roots or shard over 700. State-logging decreases from 537 to 454; other assignments and the 720-root hard cap stay unchanged. Static partition evidence is not compiler dependency-closure proof.
  • The original config.patch timeout remains unexplained. One diagnostic rerun passed the exact numeric-key case in 3790ms, the full file 79/79, and all six groups: seven files, 280 tests. Both used hosted merge 95dc99d32fddff020572968fc398ac2a01bee04c (d14 + captured main c9). Original Node 24.19/worker cap 2 differed from rerun Node 24.20.0/worker cap 3, with rerun plan concurrency 1. This is one non-reproduction, not a fixed-cause or identical-environment claim; the original packed plan was not retained for byte comparison.
  • JSON syntax and git diff --check passed. The repository formatter intentionally excludes JSON files; formatting is not applicable.
  • Fresh scoped source review found no actionable P0–P2 findings. The completed exact-head ClawSweeper review has no findings or Before merge items.

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

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review blocked

Automated review did not run, so no review verdict was produced.

Reason: The input-safety check could not safely complete for this revision.

ClawSweeper will not retry this unchanged revision.

Next step: No contributor action is requested. Maintainers should inspect the linked workflow run.

View the workflow run.

@steipete

Copy link
Copy Markdown
Contributor

Same red main, opposite direction in #148916 (dropping the agents-tools includes); closed that one in favor of this PR since #148889's post-merge note names agents-tools as the intended owner. Note for whoever lands: only one of the two directions may land, otherwise the secrets tests have no shard owner. Two PRs in this campaign (#148910 and the next lander) are waiting on this to go green on main.

@fuller-stack-dev

fuller-stack-dev commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

I am carrying #137828 through landing; its hosted boundary check hit the same 83 duplicate secrets roots after the two main merges. I have verified this canonical two-line direction preserves the agents-tools owner, and will run the executable boundary guard on the existing isolated native checkout. I will not change this branch while your current review/CI is active. I can carry any remaining fix or native landing gates if needed; keeping this PR canonical and preserving your attribution.

Independent native guard completed: on unchanged main c9b49f6de83425039a1977644c9773c5b565ada2, pnpm lint:tmp:tsgo-core-boundary fails with the duplicate secrets roots; on exact PR head d14f731e5e14a95ccde27efb483343711a7314f1, the same command exits 0. Node24.19.0/pnpm12.3.4, identical lockfile, clean isolated native checkout (restored to main afterward).

Run: https://crabbox.openclaw.ai/portal/runs/run_6a5fd48c8312

Red log SHA256 bf2066d65d24ea79b38ab6f82bd4d1b10ca744ad7ee84fa6c8ceb5569cdf0002; green log SHA256 d86ca78e9ce87a0ff166d3b492820c4adb1f58092d0ff6670aec8e793bcb9903. This proves the executable partition/boundary guard, not a full compiler typecheck. Hosted boundary CI also passed. No source changes made to this PR.

Native maintainer review is now validated against exact d14f731e5e14a95ccde27efb483343711a7314f1, zero findings; fresh ClawSweeper also reports no defects. The remaining CI failure is an unchanged server.config-patch.test.ts numeric-record-key case timing out on config.patch after10seconds (job104312005191). I verified the test, config owner and client timeout source bytes match unmodified main, and am running the focused unchanged test. A failed-job retry request was refused while the workflow is still active; no rerun was dispatched. I will retry that job once after the workflow settles, then carry the existing head through native preparation/landing when CI is green. No source or timeout changes are being made.

Focused unchanged timeout control passed on native main: 1passed,78deliberately skipped, same test and runtime owner bytes as the candidate. Run https://crabbox.openclaw.ai/portal/runs/run_4047888805f3. This is a diagnostic control, not a substitute for the pending hosted job retry.

@clawsweeper

clawsweeper Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 4:47 AM ET / 08:47 UTC.

ClawSweeper review

What this changes

Removes duplicate secrets-test assignments from the state/logging typecheck shard while retaining their agents-tools assignment.

Merge readiness

✅ Ready for maintainer review

This remains the canonical, useful repair: fetched main still assigns secrets tests twice, while the proposed change preserves the intended agents-tools owner. No actionable patch defects were found.

Priority: P2
Reviewed head: d14f731e5e14a95ccde27efb483343711a7314f1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable repair with existing invariant coverage and a passing candidate boundary check.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored CI configuration repair is exempt from external-contributor runtime proof; its changed shard assignment is supported by source inspection and a successful candidate boundary check.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored CI configuration repair is exempt from external-contributor runtime proof; its changed shard assignment is supported by source inspection and a successful candidate boundary check.
Evidence reviewed 7 items Verified introduced change: The merge-base-to-head diff removes only the two secrets include patterns from state/logging; agents-tools retains both patterns at lines 15–16. The catch-all shard explicitly excludes secrets.
Still necessary on fetched main: Fetched main retains the secrets patterns in both state/logging and agents-tools, so the duplicate assignment remains present.
Existing regression coverage: The existing repository census checks exact-once coverage with a 700-root budget. The executable boundary guard independently expands compiler configurations, rejects duplicate ownership, and checks compiler dependency boundaries; none of these safeguards changes.
Findings None None.
Security None None.

How this fits together

OpenClaw partitions test files into compiler groups for CI typechecking. Its boundary guard checks that every test has exactly one group and that groups remain within their size limits.

flowchart LR
  A[Canonical test files] --> B[Shard configurations]
  B --> C[Agents-tools owns secrets tests]
  B --> D[State and logging tests]
  C --> E[Coverage and size guard]
  D --> E
  E --> F[CI typechecking]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -2. Total -2 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 0 2 -2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 0 2 -2

Review metrics

None.

Root-cause cluster

Relationship: canonical
Canonical: #148933
Summary: Discussion explicitly selects this repair as canonical for duplicate secrets-test ownership.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep secrets tests assigned exclusively to agents-tools and retain the existing coverage, size, and compiler-boundary guards.

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

Yes: fetched main includes the same secrets patterns in two shards, and the boundary owner explicitly rejects duplicate assignments. This review verified the source path without executing tests.

Is this the best way to solve the issue?

Yes: removing the redundant assignment is the narrowest repair and matches the documented maintainer discussion; existing regression coverage already checks the invariant.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4a54a573d56a.

Labels

Label changes:

  • add P2: This is a bounded repair to CI test ownership with no product runtime change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

Label justifications:

  • P2: This is a bounded repair to CI test ownership with no product runtime change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

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)
  • fuller-stack-dev: 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.

@fuller-stack-dev fuller-stack-dev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact d14f731. The two-line deletion retains agents-tools as the sole secrets-test owner and leaves the existing root census, headroom caps, build-info isolation, and compiler dependency-boundary checks intact. Independent native evidence: unchanged c9b49 core boundary fails on83duplicates; exact d14f passes the same command (run_6a5fd48c8312). No actionable source finding.

The unchanged config.patch timeout case also passes the focused native control (run_4047888805f3). This approval is source review, not a waiver of required hosted CI or native preparation/landing gates; the failed hosted job still needs its retry after the workflow settles. Canonical direction and contributor attribution preserved.

Evidence: #148933 (comment)

@vincentkoc

Copy link
Copy Markdown
Member Author

Source-adoption update: the intended graph correction is already on main via #148826 in 0cd944c. At main 151a13a3e7be326ceef5efa43f11a0f42b38c851, state/logging has neither secrets include and agents/tools retains both; the resulting state/logging blob is 8776a03bbaebd011985b9e5a6ef08cfe0901e6d1.

This clears the source prerequisite for #148946. Leaving this PR's branch, CI, and closeout to its active owners; no retry, cancellation, or closure performed here.

@vincentkoc vincentkoc closed this Sep 15, 2026
obviyus added a commit that referenced this pull request Sep 15, 2026
## What Problem This Solves

Long foreground `exec` calls abort the whole turn after about 15 minutes despite a longer command timeout.

Closes #144514. Thanks @vicvinc for the reports and @alvinveroy for the trace in #144574.

## Why This Change Was Made

The process supervisor is the only mechanism that decides when the command expires; this state has one writer. Exec passes the supervisor's accepted deadline to run activity after preparation. Recovery adds its existing stalled-tool window so process expiry can return a tool error before whole-turn recovery is considered. The final recovery reader rechecks a deadline published after recovery was queued. Explicit cancellation and recovery of commands without an accepted deadline remain enabled.

## User Impact

Long commands can finish. Process expiry returns a tool error the turn can handle. Cancellation and genuine-hang recovery remain enabled.

## Evidence

Isolated Gateway, deterministic loopback provider, direct tools, `process` denied, default recovery timers:

`pnpm openclaw gateway run --port 19463 --bind loopback`

`pnpm openclaw agent --agent proof --message 'Run the foreground timeout fixture' --timeout 1800 --json`

Baseline `0945dabbe487213e95e84a72ad1aae3659e0e000`: `sleep 970` with `timeoutSeconds:1400` aborted at 918s. Its failure JSON, recovery logs and transcript remain; the baseline shell exit receipt was lost during an interruption.

Built and running correction `b410a592eec3a2c63bd18cdaa75dc29248e4bd40`: the same command completed in 970556 ms, delivered its tool result to the provider, and returned the final answer to the caller (exit 0). Short expiry returned a timeout tool result and final answer (exit 0). No-deadline hang recovery fired at 928s (exit 1). Background expiry also reached a final answer (exit 0).

The queued-recovery regression fails on `174d929a` and passes on the correction. The earlier successful live run used ancestor `1da1270`; it is retained as ancestor evidence.

219 tests passed on local merge `006e0ee7`, combining this correction with main `55947755` and repair #148933 (`d14f731e`). Main already contained the repair's effect; its local merge changed no files. This proof includes the full exactly-once test-root suite. The repair merge is excluded from this PR.

## Compatibility

The change adds an optional, read-only deadline reference to internal diagnostic metadata. The public event payload and declared public metadata fields remain unchanged. Existing diagnostic listeners continue to work. The reference is in-memory only and requires no configuration or stored-data migration.

## Consumers

Foreground gateway/sandbox exec and shared recovery, takeover, and admission checks.

## Invalidation

Closed invocations reject updates; terminal events retire activity.

## Tests

219 owner/sibling and partition tests passed on the recorded merge. The hosted command selects the new recovery test once; all three cases pass. Locked type preflight, changed-file lint, formatting, line and assertion checks, and dead-export checks passed. No production import or export moved in this correction.

<details>
<summary>Production growth: +133 lines</summary>

Growth accepted under the owner's standing acceptance (2026-09-15).

| File | Net lines | Responsibility |
| --- | ---: | --- |
| `agent-tools.before-tool-call.diagnostics.ts` | +24 | Start lifecycle diagnostics |
| `agent-tools.before-tool-call.wrapper.ts` | -2 | Invocation scope and closure |
| `bash-tools.exec-runtime.ts` | +2 | Publish accepted deadline |
| `diagnostic-events.ts` | +12 | Private metadata handoff |
| `diagnostic-tool-execution-liveness.ts` | +69 | Invocation-owned reference |
| `diagnostic-run-activity-snapshot.ts` | +9 | Existing recovery window |
| `diagnostic-run-activity.ts` | +11 | Retain the live reference |
| `diagnostic-stuck-session-recovery.runtime.ts` | +1 | Recheck the current deadline before abort |
| `supervisor.ts` | +5 | Project the armed deadline |
| `types.ts` | +2 | Read-only deadline contract |

</details>

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 16, 2026
…aw#148959)

## What Problem This Solves

Long foreground `exec` calls abort the whole turn after about 15 minutes despite a longer command timeout.

Closes openclaw#144514. Thanks @vicvinc for the reports and @alvinveroy for the trace in openclaw#144574.

## Why This Change Was Made

The process supervisor is the only mechanism that decides when the command expires; this state has one writer. Exec passes the supervisor's accepted deadline to run activity after preparation. Recovery adds its existing stalled-tool window so process expiry can return a tool error before whole-turn recovery is considered. The final recovery reader rechecks a deadline published after recovery was queued. Explicit cancellation and recovery of commands without an accepted deadline remain enabled.

## User Impact

Long commands can finish. Process expiry returns a tool error the turn can handle. Cancellation and genuine-hang recovery remain enabled.

## Evidence

Isolated Gateway, deterministic loopback provider, direct tools, `process` denied, default recovery timers:

`pnpm openclaw gateway run --port 19463 --bind loopback`

`pnpm openclaw agent --agent proof --message 'Run the foreground timeout fixture' --timeout 1800 --json`

Baseline `05652685fef2eac618cf75ba95bb3284f04ebb7c`: `sleep 970` with `timeoutSeconds:1400` aborted at 918s. Its failure JSON, recovery logs and transcript remain; the baseline shell exit receipt was lost during an interruption.

Built and running correction `b410a592eec3a2c63bd18cdaa75dc29248e4bd40`: the same command completed in 970556 ms, delivered its tool result to the provider, and returned the final answer to the caller (exit 0). Short expiry returned a timeout tool result and final answer (exit 0). No-deadline hang recovery fired at 928s (exit 1). Background expiry also reached a final answer (exit 0).

The queued-recovery regression fails on `174d929a` and passes on the correction. The earlier successful live run used ancestor `1da1270`; it is retained as ancestor evidence.

219 tests passed on local merge `006e0ee7`, combining this correction with main `fd5aaff9` and repair openclaw#148933 (`d14f731e`). Main already contained the repair's effect; its local merge changed no files. This proof includes the full exactly-once test-root suite. The repair merge is excluded from this PR.

## Compatibility

The change adds an optional, read-only deadline reference to internal diagnostic metadata. The public event payload and declared public metadata fields remain unchanged. Existing diagnostic listeners continue to work. The reference is in-memory only and requires no configuration or stored-data migration.

## Consumers

Foreground gateway/sandbox exec and shared recovery, takeover, and admission checks.

## Invalidation

Closed invocations reject updates; terminal events retire activity.

## Tests

219 owner/sibling and partition tests passed on the recorded merge. The hosted command selects the new recovery test once; all three cases pass. Locked type preflight, changed-file lint, formatting, line and assertion checks, and dead-export checks passed. No production import or export moved in this correction.

<details>
<summary>Production growth: +133 lines</summary>

Growth accepted under the owner's standing acceptance (2026-09-15).

| File | Net lines | Responsibility |
| --- | ---: | --- |
| `agent-tools.before-tool-call.diagnostics.ts` | +24 | Start lifecycle diagnostics |
| `agent-tools.before-tool-call.wrapper.ts` | -2 | Invocation scope and closure |
| `bash-tools.exec-runtime.ts` | +2 | Publish accepted deadline |
| `diagnostic-events.ts` | +12 | Private metadata handoff |
| `diagnostic-tool-execution-liveness.ts` | +69 | Invocation-owned reference |
| `diagnostic-run-activity-snapshot.ts` | +9 | Existing recovery window |
| `diagnostic-run-activity.ts` | +11 | Retain the live reference |
| `diagnostic-stuck-session-recovery.runtime.ts` | +1 | Recheck the current deadline before abort |
| `supervisor.ts` | +5 | Project the armed deadline |
| `types.ts` | +2 | Read-only deadline contract |

</details>

Co-authored-by: Ayaan Zaidi <[email protected]>
@RomneyDa
RomneyDa deleted the fix/ci-secrets-test-shard-owner-20260915 branch October 22, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants