Repository navigation
docs(update): format the update owner table - #203927
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
vincentkoc
marked this pull request as ready for review
November 23, 2026 05:07
vincentkoc
enabled auto-merge (squash)
November 23, 2026 05:09
Member
Author
|
Merged via squash auto-merge.
|
This was referenced Nov 23, 2026
obviyus
added a commit
that referenced
this pull request
Nov 23, 2026
…am ratchet output (#203978) The baseline ratchet job now has real heap headroom, streams every check's output while it runs, and fails a stuck run after 12 minutes. Fixes #203945 Fixes #203921 ## Problem 1. `checks-fast-baseline-ratchets` hung for 18-47 minutes with no log (#203559, #203919). The database-worker inventory walks every source file of the tree (24,427 files). The native TypeScript client keeps each AST node it creates in a per-file cache for the whole snapshot. The walks created 27.9M nodes, so the live heap after GC reached 4,071 MiB (head) and 3,890 MiB (base) against the 4,096 MiB `--max-old-space-size` cap. Near the cap, V8 spends almost all time in garbage collection, which looks like a hang. 2. The worktree source scan used `rg -g <glob>`. A positive `-g` glob overrides ignore rules, so local runs also scanned ignored build bundles (24 MB of minified JavaScript, which is why the issue saw an out-of-memory error with `--base HEAD`). The scan also skipped the 3 tracked hidden `.boundary-stubs` files, so the head file set never matched the base (CI log: head 24,423 vs base 24,426 files) and an empty diff analyzed the base a second time. 3. `scripts/ci-baseline-ratchets.mts` held each check's output in memory until the check exited. The step had only the 60-minute job limit. A stuck check printed nothing. 4. `check-docs` went red on `main` after #203914. That PR merged at 04:19:29Z through the maintainer-role bypass of the "Require OpenClaw CI gate" ruleset while `openclaw/ci-gate` was still pending (rule suite 5298779737: required status check "pending", result "bypass"). Its `check-docs` job failed at 04:21:17Z, 108 s after the merge. `check-docs` runs on that path and feeds `ci-gate`, the formatter config includes the file and there is no merge queue, so the gap is the bypass merge before CI finished. #203927 already reformatted the file; scheduled `main` CI has `check-docs` green again (run 45118053016). ## Solution - `containsTrigger()` in `scripts/lib/native-typescript.mts`: from the raw text of each file, collect the positions of the tokens that a walk can act on, plus every backslash, because an escape can spell a token (`\u0045`, identity escapes) or hide one in the raw text (a newline escape before `DELETE` reads as the token `nDELETE`). A walk goes into a node only when its source span holds such a position. Pruned subtrees are never created. - Apply it to the five whole-tree walks: - `database-worker-compat.mts`: specifier/binding collection (`import`/`export` tokens, whole import/export declarations) and reference discovery (candidate names and `import`). - `personal-credential-writer-guard.mts`: declaration/specifier collection (approved files stay whole), dynamic-import binding (`import`), and sink/reference inspection (candidate names, `type`, Kysely writer methods, SQL write verbs, `import`, `export`). Token sets are recomputed when the name set grows between files, as before. - Type subtrees are skipped in the walks that do not already skip them; they hold no value declarations or specifiers. - `loadInventorySources()` uses `--hidden --type-add/--type` instead of `-g`, so the worktree file set equals Git membership. - `ci-baseline-ratchets.mts` streams each line with a `[check]` prefix as it arrives and keeps the `[ok]`/`::error` result line and the timing summary. - `ci.yml`: `timeout-minutes: 12` on the "Run baseline ratchets" step. 14 green PR runs on 2026-11-23 took 174-305 s (median about 182 s) for this step. - Regression test: a raw authority-table write whose SQL verb is spelled next to an escape (a `\u` escape, an identity escape, and newline or tab escapes before the verb) inside a nested block is still rejected. It fails when the escape positions are removed. ## Evidence Same machine, same tree (e58ca10), live heap measured after a forced GC at each analysis phase: | | before | after | |---|---|---| | head peak live heap | 4,071 MiB | 3,320 MiB | | base peak live heap | 3,890 MiB | 3,270 MiB | | AST nodes created (head) | 27,871,206 | 18,342,788 | | headroom under the 4,096 MiB cap (head) | 25 MiB | 776 MiB | | `check:database-worker-ratchet --base HEAD`, empty diff | 116 s, base analyzed again | 63 s, base reused | - Inventory rows are byte-identical before and after, for head and base. - Intermediate analysis facts are equal: compat names 15,077, aliases 296,647, namespaces 484, references 1,829,544, compiler symbol queries 1,856,156 (base). Guard: references 18,473, command nodes 17,464, protected declarations 110, binding names 17,543, handled imports 7,855, edges 177, identical sink sets. The only head-mode deltas come from the edited analyzer files themselves (two new import specifiers). - Forced hang, local, same step command under `timeout 20` with a `pnpm` stub whose database-worker check prints one phase line and sleeps: before, the phase line appeared at 20.03 s (only at shutdown); after, at 0.20 s. Both exit 124 and leave no child process. - Tests: `database-worker-compat`, `personal-credential-writer-guard` (both files), `check-database-worker-ratchet`, `native-typescript`, `ci-baseline-ratchets`, `ci-workflow-guards`: 471 passed, 8 skipped (first head); guard and compat suites again on the final head: 215 passed. ## Repository setting (not applied) The bypass merge in item 4 is possible because ruleset 19130959 ("Require OpenClaw CI gate") gives `RepositoryRole` 2 a `bypass_mode: always`. GitHub cannot limit a bypass to completed red checks, and the override flow (`landpr --admin-override`) needs a bypass. `landpr` already refuses any pending check, so the remaining gap is a bare admin merge or the web "bypass rules" button. The only settings change that closes it is removing that bypass actor, which also blocks every `landpr --admin-override` merge for `MAIN-ALSO` reds. Default: keep the ruleset unchanged and land overrides only through `landpr`. No settings change is made here. Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 24, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 24, 2026
…am ratchet output (openclaw#203978) The baseline ratchet job now has real heap headroom, streams every check's output while it runs, and fails a stuck run after 12 minutes. Fixes openclaw#203945 Fixes openclaw#203921 ## Problem 1. `checks-fast-baseline-ratchets` hung for 18-47 minutes with no log (openclaw#203559, openclaw#203919). The database-worker inventory walks every source file of the tree (24,427 files). The native TypeScript client keeps each AST node it creates in a per-file cache for the whole snapshot. The walks created 27.9M nodes, so the live heap after GC reached 4,071 MiB (head) and 3,890 MiB (base) against the 4,096 MiB `--max-old-space-size` cap. Near the cap, V8 spends almost all time in garbage collection, which looks like a hang. 2. The worktree source scan used `rg -g <glob>`. A positive `-g` glob overrides ignore rules, so local runs also scanned ignored build bundles (24 MB of minified JavaScript, which is why the issue saw an out-of-memory error with `--base HEAD`). The scan also skipped the 3 tracked hidden `.boundary-stubs` files, so the head file set never matched the base (CI log: head 24,423 vs base 24,426 files) and an empty diff analyzed the base a second time. 3. `scripts/ci-baseline-ratchets.mts` held each check's output in memory until the check exited. The step had only the 60-minute job limit. A stuck check printed nothing. 4. `check-docs` went red on `main` after openclaw#203914. That PR merged at 04:19:29Z through the maintainer-role bypass of the "Require OpenClaw CI gate" ruleset while `openclaw/ci-gate` was still pending (rule suite 5298779737: required status check "pending", result "bypass"). Its `check-docs` job failed at 04:21:17Z, 108 s after the merge. `check-docs` runs on that path and feeds `ci-gate`, the formatter config includes the file and there is no merge queue, so the gap is the bypass merge before CI finished. openclaw#203927 already reformatted the file; scheduled `main` CI has `check-docs` green again (run 45118053016). ## Solution - `containsTrigger()` in `scripts/lib/native-typescript.mts`: from the raw text of each file, collect the positions of the tokens that a walk can act on, plus every backslash, because an escape can spell a token (`\u0045`, identity escapes) or hide one in the raw text (a newline escape before `DELETE` reads as the token `nDELETE`). A walk goes into a node only when its source span holds such a position. Pruned subtrees are never created. - Apply it to the five whole-tree walks: - `database-worker-compat.mts`: specifier/binding collection (`import`/`export` tokens, whole import/export declarations) and reference discovery (candidate names and `import`). - `personal-credential-writer-guard.mts`: declaration/specifier collection (approved files stay whole), dynamic-import binding (`import`), and sink/reference inspection (candidate names, `type`, Kysely writer methods, SQL write verbs, `import`, `export`). Token sets are recomputed when the name set grows between files, as before. - Type subtrees are skipped in the walks that do not already skip them; they hold no value declarations or specifiers. - `loadInventorySources()` uses `--hidden --type-add/--type` instead of `-g`, so the worktree file set equals Git membership. - `ci-baseline-ratchets.mts` streams each line with a `[check]` prefix as it arrives and keeps the `[ok]`/`::error` result line and the timing summary. - `ci.yml`: `timeout-minutes: 12` on the "Run baseline ratchets" step. 14 green PR runs on 2026-11-23 took 174-305 s (median about 182 s) for this step. - Regression test: a raw authority-table write whose SQL verb is spelled next to an escape (a `\u` escape, an identity escape, and newline or tab escapes before the verb) inside a nested block is still rejected. It fails when the escape positions are removed. ## Evidence Same machine, same tree (9e3b3a0), live heap measured after a forced GC at each analysis phase: | | before | after | |---|---|---| | head peak live heap | 4,071 MiB | 3,320 MiB | | base peak live heap | 3,890 MiB | 3,270 MiB | | AST nodes created (head) | 27,871,206 | 18,342,788 | | headroom under the 4,096 MiB cap (head) | 25 MiB | 776 MiB | | `check:database-worker-ratchet --base HEAD`, empty diff | 116 s, base analyzed again | 63 s, base reused | - Inventory rows are byte-identical before and after, for head and base. - Intermediate analysis facts are equal: compat names 15,077, aliases 296,647, namespaces 484, references 1,829,544, compiler symbol queries 1,856,156 (base). Guard: references 18,473, command nodes 17,464, protected declarations 110, binding names 17,543, handled imports 7,855, edges 177, identical sink sets. The only head-mode deltas come from the edited analyzer files themselves (two new import specifiers). - Forced hang, local, same step command under `timeout 20` with a `pnpm` stub whose database-worker check prints one phase line and sleeps: before, the phase line appeared at 20.03 s (only at shutdown); after, at 0.20 s. Both exit 124 and leave no child process. - Tests: `database-worker-compat`, `personal-credential-writer-guard` (both files), `check-database-worker-ratchet`, `native-typescript`, `ci-baseline-ratchets`, `ci-workflow-guards`: 471 passed, 8 skipped (first head); guard and compat suites again on the final head: 215 passed. ## Repository setting (not applied) The bypass merge in item 4 is possible because ruleset 19130959 ("Require OpenClaw CI gate") gives `RepositoryRole` 2 a `bypass_mode: always`. GitHub cannot limit a bypass to completed red checks, and the override flow (`landpr --admin-override`) needs a bypass. `landpr` already refuses any pending check, so the remaining gap is a bare admin merge or the web "bypass rules" button. The only settings change that closes it is removing that bypass actor, which also blocks every `landpr --admin-override` merge for `MAIN-ALSO` reds. Default: keep the ruleset unchanged and land overrides only through `landpr`. No settings change is made here. Co-authored-by: Ayaan Zaidi <[email protected]>
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.
What Problem This Solves
The update owner guide added in #203914 has an unformatted Markdown table. The repository formatting check flags
src/update/AGENTS.md, including in https://github.com/openclaw/openclaw/actions/runs/45114268038/job/137493900298.User Impact
Restores the formatting gate for the guide. Update behavior and instructions are unchanged.
Why This Change Was Made
Apply the repository formatter to the table. All cell text, links, and surrounding lines remain identical; only table padding and its separator change. This is a separate correction on main so dependent PRs do not acquire an unrelated copy of the guide.
Evidence
OPENCLAW_FORMAT_TOOL=oxfmt node scripts/run-format.mts --check src/update/AGENTS.md: passes.CI=true node scripts/run-format.mts --check src/update/AGENTS.md: oxfmt/Bun parity passes.node scripts/check-agents-md-size.mts: all 29 guides stay within the unchanged 20,000-character cap.git diff --check: passes. One documentation file, 9 additions and 9 deletions; no production or test code changes.