Repository navigation
docs: adopt TypeScript-first testing policy - #643
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
tianxiaochannel-oss88
enabled auto-merge (squash)
November 3, 2026 00:24
This was referenced Nov 3, 2026
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
.mjstests incrementally during module maintenance. Prefer behavior and boundary assertions while retaining independently valuable security, architecture, and declared contract checks./usr/bin/trueexecutable for its 258 real native no-op commands instead of repeatedly hashing and launching Node.Current head:
ca72ed97a5745e0c3033d13807b418630ce06dc8, synchronized withmainata09beb0ef838f1e79e73ea3eca47e191bc609fa1using ordinary merges. No force-push was used. The latest synchronization includes main's CodeQL scheduling PR #646; the earlier #644 dependency changes and the #646 workflow, selector, tests, and documentation are inherited, not part of this PR's authored delta.Scope And Compatibility
The authored delta is five files, with 70 additions and two deletions:
CONTRIBUTING.md: canonical testing policy.AGENTS.md: agent-facing testing and validation instructions..github/PULL_REQUEST_TEMPLATE.md: testing-policy and evidence checklist items.packages/daemon/test/protected-host-staging.test.mjs: lightweight executable for the existing history-budget case.packages/daemon/test/support/protected-host-stage-fixture.mjs: explicitly pin that executable in the existing fixture.Relative to synchronized main, no production runtime, CI configuration, dependency, timeout, retry, skip, assertion, loop count, or release metadata is changed. VERSION 0.2.1 is inherited unchanged from main; this is not a release or deployment.
The narrow repair remains in the existing
.mjsnative staging suite. No new test or helper is introduced, and no TS migration is claimed. Future migration must wire execution and real test type-checking together; the policy does not treat runtime transpilation or an.mjs-only glob as sufficient justification for new JavaScript tests.CI Failure And Workload Evidence
The same history-budget case reached its existing 90-second child-process deadline in runs 41442728401 and 41448314215. Other checks did not explain those failures.
This is a deterministic fixture-workload repair, not a claim that a random flake has been statistically established:
10460774: Daemon shard 3 loggedok 13withduration_ms: 16596.044958at 2026-11-02 16:31:11 UTC. That entire shard completed successfully. This historical hosted evidence predates synchronization of dependency PR chore(deps): bump the production-dependencies group across 1 directory with 7 updates #644 and does not certify current headca72ed97.ok 13withduration_ms: 20964.230125at 2026-11-02 19:25:06 UTC. The complete staging file passed in 124.63 seconds and the entire shard passed. This evidence coversff546e96, including the synchronized chore(deps): bump the production-dependencies group across 1 directory with 7 updates #644 dependencies, not current headca72ed97.Test Coverage And Gate Integrity
The case still executes 258 real ordinary native commands, closes 66 stage lifetimes, and verifies final stage registration.
trueresolves to the explicitly SHA-pinned system executable, not a shell builtin. Production supervisor, registry, authority checks, native Seatbelt spawning, actor waiting, and disposal remain in the exercised path.Forced regression probes were run against both the original and repaired case paths:
No tests were added, removed, consolidated, disabled, or renamed. Repeated Node startup/hash stress is intentionally reduced in this cardinality case; the separate Node-based stage read/write, ancestor-rename, and security cases remain unchanged. This does not claim equivalence of every incidental workload characteristic.
Validation
ff546e96,corepack pnpm install --frozen-lockfileandcorepack pnpm --filter @ling-stack/daemon buildpassed with Node 22.22.1.ff546e96, with no failures or skips: protected-host staging, actor inventory, cross-registry domain, and external-workflow request runtime, using Node 22.22.1 with--test-concurrency=1. Total duration was 126,135 ms; the repaired history-budget case passed in 9,545 ms in this run.corepack pnpm --filter @ling-stack/daemon typecheck:cipassed. This checks the package's TypeScript source, not the existing.mjstests.corepack pnpm check:docspassed: 542 Markdown files.corepack pnpm check:licensespassed onff546e96: 1,245 dependency versions. The subsequent ci: align CodeQL scheduling with OpenClaw #646 synchronization does not change dependency inputs.corepack pnpm check:publicpassed: 6,615 repository files.git diff --check origin/main...HEADpassed.Historical hosted CI for preceding head
ff546e96: 41489003401, attempt 2 completed successfully at 2026-11-02 19:34:27 UTC. All seventeen CI jobs passed, including all four daemon shards and the requiredTypecheck, unit tests, and Web buildaggregate. The aggregate also verified complete planned file coverage for core and daemon. The separate CodeQL run 41488995210 completed successfully. That PR watcher reported nineteen passing check contexts and required checks 1/1 green. These results do not certify the new head below. No CI override is requested or used.Latest Main Synchronization
Before merging, a fresh readback found that main had advanced to
a09beb0evia PR #646 and strict branch protection reportedBEHIND. Main was merged normally into this branch asca72ed97; no conflict, force-push, or protection override was needed. The authored delta remains the same five files, 70 additions and two deletions. The protected-host test and fixture, agent policy, and PR checklist are byte-identical toff546e96.On
ca72ed97,node --test scripts/ci/codeql-scope.test.mjspassed 14/14 tests,corepack pnpm check:docspassed for 542 Markdown files, andgit diff --check origin/main...HEADpassed. Fresh hosted CI 41548564233 completed successfully at 2026-11-03 00:21:05 UTC: all seventeen jobs passed, including all four daemon shards and the required aggregate's planned-file coverage verification. CodeQL 41548564211 completed successfully at 2026-11-02 23:56:07 UTC. All twenty registered check contexts passed on this exact head. The freshgstack-ci-gate --expect-head ca72ed97a5745e0c3033d13807b418630ce06dc8verdict is PASS; previous-head results are not substituted and no CI override is used.Runner Allocation Interruption
At 2026-11-02 18:45:36 UTC, daemon shard 1 was cancelled without acquiring a runner. Daemon shard 3 was cancelled for the same reason at 18:55:37 UTC. Both jobs have empty runner names and zero execution steps. Their check annotations state:
Additional annotations explicitly identify macOS arm64 runner capacity constraints and longer queues.
This is infrastructure evidence outside the PR, not a failing test or an established test flake. Fourteen other CI jobs, including daemon shards 0 and 2 and the real macOS helper/Seatbelt lane, passed on this head. Attempt 1 completed at 18:56:12 UTC; the required aggregate failed because daemon coverage was incomplete.
Two single-job rerun requests before workflow completion were rejected, with no retry accepted at that time. The direct REST response confirmed HTTP 403:
The workflow run containing this job is already running.After attempt 1 completed, one bounded failed-jobs rerun was accepted at 18:57:19 UTC as attempt 2. Readback confirms that only daemon shards 1 and 3 are newly queued, with new job IDs
125483283669and125483283379; the fourteen successful jobs retain their original execution timestamps and conclusions. The failed required aggregate must rerun after those shards complete. Retry accounting is two rejected requests and one accepted allocation retry. No source, runner label, test threshold, or assertion is changed for this interruption; it is not waived as a pass.Both retry shards subsequently passed: shard 1 at 19:21:54 UTC and shard 3 at 19:30:57 UTC. The dependent required aggregate passed at 19:34:26 UTC, including the planned-file coverage verification. No further retry was submitted.
Review And Remaining Acceptance
The current five-file diff was read in full again against main and checked against the pre-landing checklist. The earlier independent read-only review traced the unchanged executable replacement through the real native runtime path and found no blocking coverage issue. No blocking finding is currently identified. The earlier ship/review receipt for
addc77e2is historical and does not certify this head.This PR establishes contributor guidance, not an automatic repository-wide TS enforcement mechanism or a completed test migration. No frontend change, model prompt change, packaged GUI acceptance, Windows acceptance, or production deployment is included. Hosted platform lanes passed on current head
ca72ed97; this does not certify packaged or Windows acceptance.The pre-merge readback had main and the PR base at
a09beb0e, this PR atca72ed97, zero commits behind main, and no unresolved review threads. The owner explicitly authorized merging this PR with "合并吧". GitHub reportedMERGEABLEbutBLOCKED, with an automatic squash-merge request enabled at 2026-11-03 00:24:14 UTC and no merge-queue entry. The current account was allowed to update main through a PR undermain-admin-only-merges; the separateprotect-mainruleset had no bypass actors and required the successful CI aggregate, strict base freshness, and resolved review threads.Merge Result
PR #643 was squash-merged at 2026-11-03 00:34:07 UTC as
bea22d35e744020b5bafb03d02b1e1fc6d0ea153. After a fresh exact-head CI gate returned PASS and target/cleanliness checks passed, the standard REST merge endpoint acceptedsha=ca72ed97a5745e0c3033d13807b418630ce06dc8andmerge_method=squash. No--admin, protection change, CI override, force-push, or automatic-request cancellation was used. This normal merge completed while the earlier automatic request had remained pending; it did not wait for that request to resolve by itself.Authoritative GraphQL readback confirms
state=MERGED, the merge timestamp and SHA, and main at the same merge commit.origin/mainwas fetched and verified to contain the merge commit.git diff --exit-code ca72ed97a5745e0c3033d13807b418630ce06dc8 bea22d35e744020b5bafb03d02b1e1fc6d0ea153passed, confirming identical final file contents. The authored change remains five files, 70 additions and two deletions. The remote topic branch was automatically deleted and verified absent withgit ls-remote. Local branches, other worktrees, active sessions, and services were left unchanged. No release or deployment was performed.Test Plan
10460774.