Skip to content

fix: halve publish-time memory for any OpenClaw release without per-release tables - #129

Merged
vincentkoc merged 14 commits into
mainfrom
fix/publish-memory-without-lookup
Nov 4, 2026
Merged

vincentkoc merged 14 commits into
mainfrom
fix/publish-memory-without-lookup

Conversation

@Patrick-Erichsen

@Patrick-Erichsen Patrick-Erichsen commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Publish-time inspection of discord, matrix and whatsapp peaks at ≤50% of 0.4.5 on Linux Node 24, both unbundled and esbuild-bundled like ClawHub's Convex actions. This holds for OpenClaw 2026.10.10, for an unseen snapshot, and for synthetic future releases with new SDK surface, including replacement names computed by template literals.

One case is not within 50% by design, and it needs a decision (see "Trade-off"): replacement names whose availability depends on TypeScript's assignability, which only a type check can decide.

What changed

  1. Retirement qualification without a type checker (src/packed-sdk-certificates.js). Each SDK replacement name is decided from the packed declarations:

    • Available (exact): the name is an entry export (direct, re-exported, implicit in an ambient module, export * as, or export default <identifier>). Or it is an own member of a type the public walk reaches through steps with unambiguous TypeScript semantics:
      • interfaces, classes and object types, including generic object-literal aliases;
      • unions and intersections that can't collapse to any/never;
      • typeof of classes (statics only), functions, enums, variables and bindings;
      • literal conditionals;
      • global declarations;
      • non-homomorphic mapped types over finite literal keys, with as clauses built from templates.
    • Unavailable (sound): no reachable text spells the name where a property name can come from, and nothing reachable can compute it. Template literals over finite unions are enumerated exactly; open templates (${string}), intrinsic, tuples, length and prototype block negative certificates.
    • Undecided: the name goes to the exact reduced type check, so the result never depends on which path ran.
  2. Scope facts without a full scope graph (src/scope-facts.js). Runtime-import classification only asks eslint-scope about a few names: require callees, createRequire imports and their handles, namespace import locals, callback parameters and declarator ids. This PR drives eslint-scope's own, unchanged Referencer, so which identifiers are references or definitions, in which scope, with which flags and in which order, stays eslint-scope's. The scope manager behind it only keeps declarations and references for those names, and resolves the way Scope#__close does:

    • deferred delegation to the upper scope;
    • function scopes reject parameter references to body-only declarations;
    • implicit arguments;
    • global static close.

    Files with direct eval, with, or nesting deeper than 500 levels still use the full ScopeManager. A throw still yields the same fallback.

    For the 351 KB discord bundle this removes a ~6 MB scope graph that used to live, and be promoted, during analysis. That was what made V8 double the young generation in some runs: the bimodal bundled discord result of 258 vs 315 MiB in run 41797514068 attempt 2.

  3. Lifetimes. Each file's analysis is released after its last use. The rule pass runs after the runtime-import passes. Member-chain checks no longer allocate. The certifier parses 8 KB pieces once each, without caching. Its tables are compact.

  4. No type stripper for plain JavaScript (src/plain-javascript.js). Runtime-import classification ran every file through Node's stripTypeScriptTypes, which loads swc as WebAssembly and keeps ~25–50 MB of linear memory for the rest of the process. Strip mode only blanks TypeScript syntax, and JavaScript can only contain TypeScript syntax where the TypeScript grammar reads the same tokens differently. The check refuses each such place from the tokens of the acorn parse the analysis needs anyway (and that tree is then reused):

    • possible type argument lists: any </<< that closes with > over tokens that can occur in types (f<T>(x), f<g<T>>(x), a<b> before a line break, tagged templates, new);
    • arrow return types: cond ? (a): T => b, case (a): b => c;
    • declare/namespace/global/type/… at a statement start followed by a word, literal or brace (swc accepts declare\nconst x = 1 across the line break);
    • a prefix ! after a line break that could be a non-null assertion, HTML-like comments, and a byte order mark (swc drops it).

    Anything refused, and every TypeScript file, is stripped exactly as before. Sources swc rejects as invalid (with, legacy octals, top-level return) give the same result either way, and transform mode rejects them identically.

  5. Names copied out of declaration files. apiRegistrars, hookNames, manifestFields and manifestContractFields were V8 slices of the packed .d.ts files, so the target surface kept a 5.2 MB and a 0.9 MB declaration file alive through inspection.

  6. Files decoded in one piece (src/read-text.js). readFile(path, "utf8") decodes a large file chunk by chunk into a concatenated string that V8 flattens into a copy on first use: the 2.7 MB packed declaration chunk cost ~10 MB of young objects that survived collections. Decoding the whole buffer gives the identical text as one string. This is what moves discord away from the young-generation cliff (below).

  7. Bug fix in merged fix: halve publish-time inspection memory for packed OpenClaw targets #128 code. Export-context .d.ts files are now kept whole by the reducer.

Linux CI (ubuntu-latest, Node 24.22.1, npm tarballs, 0.4.5 in the same job)

Run 41813458081 on 8de7260 (4061d3d on top only moves shared helpers; its run is 41814332643). Peak RSS in MiB, median (range). Ratio is the candidate median over the 0.4.5 median; the worst-run column divides the candidate's highest run by the 0.4.5 median.

Scenario Plugin 0.4.5 Candidate Ratio Worst run Outputs
OpenClaw 2026.10.10 (5 runs) discord 514.7 (514.5–517.9) 218.0 (216.8–221.7) 42.4% 43.1% identical
OpenClaw 2026.10.10 (5 runs) matrix 507.1 (506.3–510.6) 204.4 (197.3–206) 40.3% 40.6% identical
OpenClaw 2026.10.10 (5 runs) whatsapp 494.5 (492.2–495.6) 186.8 (185.8–188.1) 37.8% 38.0% identical
Unseen snapshot (3 runs) discord 516.5 (514.6–517.2) 218.7 (218.3–219) 42.3% 42.4% identical
Unseen snapshot (3 runs) matrix 502.6 (501–503) 203.6 (197–204.3) 40.5% 40.6% identical
Unseen snapshot (3 runs) whatsapp 479.4 (479.1–482.2) 186.6 (186.2–187) 38.9% 39.0% identical
Future release, new SDK surface (3 runs) discord 515.6 (515.2–517) 218.7 (217.6–219.6) 42.4% 42.6% identical
Future release, new SDK surface (3 runs) matrix 506.7 (504.4–509.6) 210.1 (208–210.2) 41.5% 41.5% identical
Future release, new SDK surface (3 runs) whatsapp 495.8 (493.7–496.3) 186.7 (185.8–186.8) 37.7% 37.7% identical
Future release, computed names (3 runs) discord 517.5 (516–519.8) 218.4 (217.4–218.6) 42.2% 42.2% identical
Future release, computed names (3 runs) matrix 509.0 (506.1–509.2) 205.0 (204.2–210.1) 40.3% 41.3% identical
Future release, computed names (3 runs) whatsapp 495.9 (495.1–497) 186.9 (185.8–187.4) 37.7% 37.8% identical
esbuild-bundled like ClawHub (5 runs) discord 537.5 (536.5–599.1) 242.8 (238–243.5) 45.2% 45.3% identical
esbuild-bundled like ClawHub (5 runs) matrix 528.8 (526.7–533.2) 228.0 (220.9–230.2) 43.1% 43.5% identical
esbuild-bundled like ClawHub (5 runs) whatsapp 514.9 (511.8–516.9) 220.1 (216.7–221) 42.7% 42.9% identical
Future release, undecidable names: exact fallback, gate 85% (1 run) discord 517.3 (517.3–517.3) 386.4 (386.4–386.4) 74.7% 74.7% identical
Future release, undecidable names: exact fallback, gate 85% (1 run) matrix 508.2 (508.2–508.2) 377.8 (377.8–377.8) 74.3% 74.3% identical
Future release, undecidable names: exact fallback, gate 85% (1 run) whatsapp 496.7 (496.7–496.7) 368.4 (368.4–368.4) 74.2% 74.2% identical

Every gated row compares target-surface and findings hashes with 0.4.5, and every row is identical.

Equivalence evidence

  • Scope facts vs eslint-scope:
    • Differential test of collectRuntimeModuleImports against main's pure-eslint-scope implementation, all three option sets, output order included: 25,882 unique files (300.7 MB) from ClawHub's node_modules and the global npm modules, plus 4,893 files (43 MB) from the plugin packages, the inspector's dependencies and the 0.4.3/0.4.5 baselines. Together that's 92,325 comparisons, 0 mismatches.
    • scripts/verify-scope-facts.mjs compares the facts themselves (each requested variable's identifiers, definition count, references, read/write/init/static flags, and declared-variable lookups) with the full ScopeManager: 4,099 files, 0 differences. CI runs it on the plugin packages.
    • Adversarial generator covering shadowed require, defaults vs body declarations, block/catch/for/switch/class scopes, class heritage and fields, named function expressions, createRequire handles, callbacks, hoisting, destructuring, exports and labels: 2,676 sources, 8,028 comparisons, 0 mismatches.
    • test/scope-facts.test.js covers 13 cases.
  • Plain-JavaScript check vs Node's stripper (bench-v2-style validation over ClawHub's node_modules, the global npm modules, the plugin packages, the baselines and the inspector's dependencies): 31,915 unique sources (348.6 MB); 27,012 accepted (275.3 MB), and every accepted source strips to the identical text (one is rejected by swc as invalid, which gives the same result). The validation found one real gap, a byte order mark, which is now refused. test/plain-javascript.test.js checks that each JavaScript/TypeScript ambiguity swc changes is refused and that accepted samples strip to themselves.
  • Runtime imports after the plain-JavaScript change vs main: rerun of the differential test with this change: 25,882 files (300.7 MB), 77,646 comparisons, 0 mismatches, plus the plugin-package corpus: 4,893 files, 14,679 comparisons, 0 mismatches.
  • Retirement certificates vs the full 0.4.5 type check (scripts/verify-packed-sdk-certificates.mjs, every name spelled in a snapshot): 18 published releases plus the future fixtures, about 650,000 names, 0 disagreements.
    • Published releases and the plain and computed-names future fixtures are fully decided for the real inventory.
    • The undecidable fixture leaves exactly its 2 conditional names to the fallback.
    • test/packed-sdk-certificates.test.js has 14 tests, including future-shaped and computed snapshots, and an end-to-end check that retirement records equal filtering by the full type check, with and without the fallback.
  • npm run check: 929 tests pass.

Future fixtures

scripts/make-future-openclaw-fixture.mjs derives future packages from the fetched OpenClaw.

  • Plain: a new ./plugin-sdk/future-runtime entry with no export declarations, a ./plugin-sdk/future-default entry with a default export, and new chunks with minified re-exports. Through them it exposes:

    • an async class with statics and a getter;
    • a generic alias and a versioned literal conditional;
    • destructured bindings and an enum;
    • a declare global interface and typeof usage.

    0.4.5's full check finds 21 retirement records instead of 18, and the certificates match with nothing undecided.

  • --computed-names: adds { [K in Verbs as \${K}Async`]: … }`. The names are enumerated exactly; gated at 50%.

  • --undecidable: adds T extends { kind: K } ? … : … over object types. This needs assignability, so it takes the exact fallback.

Trade-off that needs a decision: exact answers for type-dependent names

The undecidable fixture keeps outputs identical to 0.4.5, but only by type-checking the SDK closure, which costs 74–75% of 0.4.5 on Linux (78–83% on fa700ce, before files were decoded in one piece). This is not a tuning gap:

  • Why certificates can't close it: TypeScript's conditional types, inference and instantiation are a full type system. A syntactic certificate can't decide assignability in general.
  • Why a cheaper type check doesn't fit: any exact answer computed with TypeScript's checker needs the declarations those types reach. Even an aggressive (unsound) pruning experiment left 32% of the 5.5 MB declaration text and peaked at about 340 MiB on its own (≈65% of 0.4.5), before plugin inspection is counted.

The options:

  1. Keep exactness (this PR). Type-dependent names cost about 75% of 0.4.5 for that publish (gated at 85%). No published release triggers it today. CI keeps identical outputs and guards the fallback at 85%.
  2. Cap memory. Treat type-dependent names as unavailable and omit their retirement advice. This stays within budget, but findings would differ from 0.4.5 in exactly those cases.

Remaining limits

  • Type-dependent replacement names: see the trade-off above.
  • Margins and the young-generation cliff: the worst gated run is 45.3% (bundled discord); unbundled is at most 43.1%. The candidate runs with a 32 MiB semi-space; V8 doubles it to 64 MiB once enough objects have survived scavenges since the last expansion, which adds about 20–40 MiB at once. Before 8de7260, bundled discord grew in 3 of 6 local runs (273 → ~295 MiB; macOS, same Node) and unbundled discord in 1 of 6, even though no CI row grew. After decoding files in one piece, it grew in 0 of 8 local runs, as did matrix and whatsapp (8 each bundled, 6 each unbundled). In CI, no candidate row's young generation went past 64 MiB. Unbundled discord now reaches the 32 MiB semi-space only during inspection, with ~11 MB of survivals after it against the ~32 MB that would trigger the next doubling.

ClawHub

No npm publish, deploy or consumer bump. After a release, ClawHub can unpin from 0.4.3 and bump, and update #4362's test, which expects all 50 unfiltered records.

@clawsweeper

clawsweeper Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

🦞👀
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.

@Patrick-Erichsen Patrick-Erichsen changed the title fix: qualify SDK retirements without per-release tables fix: qualify SDK retirements for any OpenClaw release without per-release tables Nov 4, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 4, 2026
@clawsweeper

clawsweeper Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

This PR replaces release-specific SDK qualification tables with declaration certificates and reduces allocations during plugin inspection.

Example: Inspect @openclaw/discord against OpenClaw 2026.10.10 on Linux Node 24.

  • Before: The reported 0.4.5 baseline peaks at 514.7 MiB.
  • After: The measured candidate peaks at 218.0 MiB with identical target surfaces and findings.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Real-package API proof and broad differential checks support the repair; the substantial semantic implementation and one redundant test keep the patch below A.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Public measurements exercise packed-target preparation and pluginRoot.runCheck on real Discord, Matrix and WhatsApp packages under Linux Node 24, both directly and bundled, with lower RSS and identical output hashes; the previous revision’s complete gate passed, and the current cycle repair has reported differential regressions and Crabpot smoke validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Large plugin publishes can exhaust the hosted inspection memory limit, and release-specific optimization tables require repeated maintenance.
Reason: The maintainer-backed direction addresses a demonstrated publishing failure, preserves output semantics, and removes release-specific maintenance.

Merge readiness

✅ Ready for maintainer review

Keep open: the memory improvements remain distinct from main, and the previous correctness findings are addressed. No blocking code findings remain; the current head’s memory gate is still running.

Priority: P2
Reviewed head: f4bb0f8e477439d7caf018de079c7a37a64c512a

Before merge

None.

Findings

None.

Tests

  • Low-value test test/plain-javascript.test.js: Remove the final test at lines 110–117: it conditionally repeats rejection assertions already made unconditionally for every ambiguous sample and catches no distinct failure.
Agent review details

How this fits together

Plugin Inspector reads packed OpenClaw declarations and plugin source, determines which replacement APIs exist, and produces compatibility findings consumed by publishers and ClawHub.

flowchart TD
  A[Packed OpenClaw declarations] --> B[Declaration certificates]
  B --> C[Exact checker for undecided names]
  B --> D[Qualified retirement records]
  C --> D
  E[Plugin source] --> F[Runtime import analysis]
  D --> G[Compatibility report]
  F --> G
Loading

Technical review

Best possible solution:

Land the certificate and allocation improvements after the existing checks pass, preserving exact fallback answers and stable report contracts.

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

Main still invokes the reduced checker for unknown declaration snapshots, and the linked downstream report establishes actual publish failures on 0.4.5; this read-only review ran no target code.

Is this the best way to solve the issue?

The general certificate path removes per-release maintenance while retaining the existing checker as the authority for uncertain names; the latest shared traversal state fixes the reported cycles without suppressing inference upgrades.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 81ccff0f2c4f.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Review metrics

Metric Value Why it matters
Source and test growth Executable source +1752/-102; qualification data -527 lines; tests +562/-36. The growth implements general declaration qualification and allocation reductions, supported by checker and scope differential coverage.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.
  • remove merge-risk: 🚨 availability: Current PR review selected no merge-risk labels.

Label justifications:

  • P2: This is a useful, bounded performance repair for large-plugin publishing, with a downstream rollback already mitigating the production failure.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (3 earlier review cycles)
  • reviewed 2026-11-04T08:09:32.914Z sha b7c5468 :: needs changes before merge. :: [P2] Defer overridden inherited property types to the checker | [P2] Stop cycles before following named re-exports
  • reviewed 2026-11-04T10:34:15.684Z sha 4061d3d :: needs changes before merge. :: [P2] Preserve cycle detection across negative-walk module edges
  • reviewed 2026-11-04T10:39:33.534Z sha 4061d3d :: needs changes before merge. :: [P2] Preserve cycle detection across negative-walk module edges

Reviewed November 4, 2026, 5:46 AM ET / 10:46 UTC (Revision 4).

@Patrick-Erichsen Patrick-Erichsen changed the title fix: qualify SDK retirements for any OpenClaw release without per-release tables fix: halve publish-time memory for any OpenClaw release without per-release tables Nov 4, 2026
@Patrick-Erichsen
Patrick-Erichsen marked this pull request as ready for review November 4, 2026 08:26
@Patrick-Erichsen
Patrick-Erichsen requested a review from a team as a code owner November 4, 2026 08:26
Remove the shipped per-version qualification table. Decide each replacement
name from the packed declarations with certificates that need no TypeScript
program: available answers are exact, unavailable answers are sound, and any
undecided name still goes to the reduced type check. Treat ambient modules
without export declarations as export contexts in the reducer as well.

Gate CI at 50% of 0.4.5 for the published target, an unseen snapshot and the
esbuild-bundled build, and verify certificates against the full type check.
Run the negative certificate pass once (deeply wherever the snapshot can
infer), and stop the positive walk once every candidate is proven. Parse
runtime-import analysis ASTs with nodes that compute ranges on demand and
carry parent and resolved-reference slots instead of a range array, a Map
entry and a Set entry per node; the analysis is unchanged.
Store statement spans in typed arrays and single table entries directly.
A large file's syntax tree and scope graph are partly promoted while they are
analyzed; dead old-space objects then keep the young remainder alive through
the remembered set, so later scavenges promote it too and V8 grows the young
generation. Clear the links once both runtime-import passes are done, run the
rule pass after them, and key certifier walks by number instead of long
concatenated strings. Results are unchanged.
Add a generator for future OpenClaw packages with new SDK entrypoints and
declaration shapes (implicit exports, minified re-exports, default exports,
declaration merging, generic and conditional aliases, destructured bindings,
global augmentation, typeof, namespace exports) and an optional computed-name
variant that takes the exact fallback. Gate the future release at 50% of
0.4.5 in CI and verify certificates on it.

Certificates now follow typeof, global declarations, export default of an
identifier and module-namespace exports, ignore destructuring-annotation
member names, and no longer walk a class's instance type from its value
(prototype has no declaration, so the type check never does).
Runtime-import classification needs eslint-scope's answers for a few names
(require callees, createRequire handles, namespace imports, callback
parameters, declarator ids). Drive eslint-scope's unchanged Referencer with a
scope manager that tracks declarations and references only for those names,
resolving exactly as Scope#__close does; files with direct eval or with, or
deep trees, still use the full ScopeManager. A large bundle no longer builds
a multi-megabyte scope graph that is promoted during analysis, which made V8
grow the young generation and RSS vary by ~60 MB between runs.

Certificates now enumerate template literals over finite unions and certify
mapped-type keys built from them, so computed future names are exact. Gate
the computed-names future release at 50%, run an undecidable variant through
the exact fallback with identical outputs, and verify scope facts on the
plugin packages in CI.
@Patrick-Erichsen
Patrick-Erichsen force-pushed the fix/publish-memory-without-lookup branch from 84ca602 to 613f878 Compare November 4, 2026 09:07
@vincentkoc

Copy link
Copy Markdown
Member

Maintainer revalidation at current head 3d42e3cbf05dc9f7246732a62d511bbf7d0692d1: keep open; not merge-ready.

Both correctness findings from the earlier review still reproduce against this revision:

  1. interface Base { child: { compareAndApply(): void } | { other(): void } } interface Derived extends Base { child: { other(): void } } export { Derived }; produces full-checker availability false, but certifyPublicSdkNames certifies compareAndApply available with no undecided result.
  2. An entry exporting Loop from a module that re-exports it through a second module back to the first, alongside an exported interface containing compareAndApply, throws RangeError: Maximum call stack size exceeded in certificate resolution.

The latest Publish memory run also fails the bundled Discord gate: 270.4 MiB / 536.1 MiB = 0.504, above the 0.5 limit. The gate must remain intact.

Please resolve the effective-member and export-cycle cases with differential regressions, then validate the unchanged memory gate and current-revision Crabpot source smoke. No release is authorized.

Patrick-Erichsen and others added 2 commits November 4, 2026 01:57
…declaration files

Node's type stripper keeps ~25-50 MB of WebAssembly memory for the rest of
the process. JavaScript whose tokens contain nothing the TypeScript grammar
reads differently strips to itself, so decide that from the acorn parse the
runtime-import analysis already needs (and reuse that tree). Validated on
31,915 sources: every accepted one strips to the identical text.

Names matched out of packed declaration files were sliced strings that kept
whole multi-megabyte files alive with the target surface.
@vincentkoc

Copy link
Copy Markdown
Member

Maintainer fixes pushed at 61348c2 on this PR branch:

  • Track export-resolution visits separately from local-name visits so cyclic named re-exports terminate without hiding an accompanying valid API.
  • Certify an interface own members, leaving inherited members to the exact checker. Walking base member types separately ignores derived overrides and can prescribe absent replacements. The fallback preserves both overridden-member rejection and valid inherited API availability.
  • Added differential regressions for both cases, plus retirement-record filtering through the inheritance fallback.

Validation: npm run check passed all 931 tests and package contents validation on Node 26. Crabpot source-mode smoke against this revision produced the same complete report as current-main baseline after removing generatedAt (60 fixtures, 83 existing breakages). No package pin bump or publish was performed. Hosted checks, including the unchanged 50% memory gate, must pass before merge.

vincentkoc and others added 3 commits November 4, 2026 18:09
readFile(path, "utf8") decodes a large file chunk by chunk into a
concatenated string that V8 flattens into a copy on first use. For the
2.7 MB packed declaration chunk that is ~10 MB of young objects that
survive collections, which pushed V8 to double the young generation in
some runs (bundled discord grew in 3 of 6 local runs; 0 of 8 after).
Decoding the whole buffer gives the identical text.
@vincentkoc vincentkoc closed this Nov 4, 2026
@vincentkoc vincentkoc reopened this Nov 4, 2026
@vincentkoc

Copy link
Copy Markdown
Member

@clawsweeper re-review

Current head 8de7260 includes the inheritance and export-cycle fixes with differential regressions. Current-main integration passed all 931 local tests and package contents validation before the final file-decoding optimization. Hosted Linux and Windows checks now pass for the latest head; Crabpot source-mode JSON reports are identical to main after removing generatedAt. The memory gate is running. Closing/reopening refreshed a stale GitHub merge ref; the PR is now mergeable.

@clawsweeper

clawsweeper Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. labels Nov 4, 2026
@vincentkoc

Copy link
Copy Markdown
Member

@clawsweeper re-review

Fixed the negative-walk cycle finding in f4bb0f8. Module, local-name and export traversal now share per-run visit state, with separate shallow/deep states so an inference path can upgrade an earlier shallow visit. Regressions cover self-namespace exports, mutual namespace exports, imported-local export cycles, and a shallow module upgraded for parameter inference. The cycle tests reproduced RangeError before the fix.

All 934 local tests and package contents checks pass. Crabpot source-mode report remains identical to main excluding generatedAt. The previous head passed the full hosted memory gate; the unchanged gate must now validate this fix too.

@clawsweeper

clawsweeper Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added 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. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. labels Nov 4, 2026
@vincentkoc
vincentkoc merged commit afbc6fb into main Nov 4, 2026
11 checks passed
@vincentkoc
vincentkoc deleted the fix/publish-memory-without-lookup branch November 4, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants