Skip to content

chore(tooling): enforce indexed access in core tests - #105375

Merged
steipete merged 5 commits into
mainfrom
codex/nuia-core-test
Jul 12, 2026
Merged

steipete merged 5 commits into
mainfrom
codex/nuia-core-test

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Follow-up to #105343 and #104600.

What Problem This Solves

The shared test TypeScript config still opted out of noUncheckedIndexedAccess, leaving the core test lane's indexed-access assumptions outside the production safety baseline. The July inventory counted 2,685 diagnostics; current main had drifted to 2,432.

Why This Change Was Made

  • Removes the final shared test opt-out, so all four test lanes inherit the base noUncheckedIndexedAccess: true setting.
  • Burns the core lane from 2,432 diagnostics to zero across 376 test files using iteration where practical, boundary guards where absence is real, and contextual expectDefined checks for genuine fixture invariants.
  • Preserves optional-chain spreads, tail lookaheads, first-time paths, and the documented legitimate-absence regression classes.
  • Removes now-redundant explicit true settings from the already-landed root, UI, and extension lane configs.
  • Changes test code and test configuration only; no product runtime or dependencies change.

User Impact

No runtime impact. Every production and test TypeScript lane now enforces indexed-access safety from the base configuration.

Evidence

  • node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental false --pretty false — clean on Blacksmith Testbox; 2,432 diagnostics to zero.
  • pnpm check:changed — clean on Blacksmith Testbox in 12m56s, including production/test typechecks, formatting, core/extension/script lint, SDK/package guards, import cycles, and policy checks.
  • pnpm test:changed — 33 Vitest shards passed on Blacksmith Testbox in 6m08s, including 2,783 agent tests and all touched core projects.
  • git diff --check, targeted oxfmt, and a complete opt-out search — pass; only the base noUncheckedIndexedAccess: true remains.
  • Fresh structured autoreview covered all 381 changed files in seven disjoint safety-bounded bundles. No accepted/actionable findings remain; one claimed missing export was rejected with direct barrel-source, strict-compiler, and runtime-test proof.

Testbox lease tbx_01kxb2j72v773qhzk4dn9aq65c (blue-barnacle-626c).

@steipete
steipete requested a review from a team as a code owner July 12, 2026 12:56
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes commands Command implementations agents Agent runtime and tooling size: XL maintainer Maintainer-authored PR labels Jul 12, 2026
@clawsweeper

clawsweeper Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: chore(tooling): enforce indexed access in core tests This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@clawsweeper

clawsweeper Bot commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 12, 2026, 9:28 AM ET / 13:28 UTC.

Summary
The PR removes the shared test opt-out for indexed-access checks and updates core test code to satisfy the stricter type setting.

Reproducibility: not applicable. the PR closes a static compiler-diagnostic inventory rather than reproducing a runtime defect.

Review metrics: 1 noteworthy metric.

  • Test compiler overrides: 1 false removed, 3 redundant true overrides removed. The change makes the base noUncheckedIndexedAccess setting the single compiler source of truth across all test lanes.

Stored data model
Persistent data-model change detected: serialized state: src/agents/auth-profiles/oauth.openai-codex-refresh-fallback.test.ts, serialized state: src/agents/bootstrap-files.test.ts, serialized state: src/agents/cli-runner.helpers.test.ts, serialized state: src/agents/cli-runner.reliability.test.ts, serialized state: src/agents/cli-runner.spawn.test.ts, serialized state: src/plugins/plugin-registry.test.ts, and 5 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #104600
Summary: This PR implements the remaining core-test portion of the indexed-access rollout tracked by the umbrella issue.

Members:

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

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Next step before merge

  • [P1] No repair defect remains; this protected maintainer-labeled PR should proceed through ordinary exact-head merge handling.

Security
Cleared: The patch is limited to tests and test TypeScript configuration, with no dependency, workflow, permission, secret-handling, package-resolution, or production execution change.

Review details

Best possible solution:

Merge the coherent test-only config flip once normal protected-label maintainer handling confirms the exact head, using the base noUncheckedIndexedAccess setting as the single source of truth for every test lane.

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

Not applicable; the PR closes a static compiler-diagnostic inventory rather than reproducing a runtime defect.

Is this the best way to solve the issue?

Yes; removing the final shared opt-out and redundant lane overrides is the canonical end state, and the individual rewrites explicitly preserve fixture invariants rather than adding a parallel safety mechanism.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 58d55ca0f564.

Label changes

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-labeled PR changes only static test code and test compiler configuration, so exact typecheck and test-lane validation are the appropriate proof rather than a user runtime demonstration.

Label justifications:

  • P3: This is broad but low-user-risk internal test-tooling hardening with no production runtime change.
  • 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: This maintainer-labeled PR changes only static test code and test compiler configuration, so exact typecheck and test-lane validation are the appropriate proof rather than a user runtime demonstration.
Evidence reviewed

What I checked:

  • Current main still needs the change: Current main sets noUncheckedIndexedAccess to true in the base config but overrides it to false for shared test lanes, so the PR's central change is not already implemented. (test/tsconfig/tsconfig.test.json:4, 58d55ca0f564)
  • Prior finding resolved: The follow-up commit completes indexed-access migration in the doctor-session SQLite fixtures with explicit guards for manifest targets and moves, resolving the previous review's only finding. (src/commands/doctor-session-sqlite.test.ts:683, 81b664f8b974)
  • Test-only surface: The head diff contains 377 test source files and four test TypeScript configurations, with no production source, workflow, dependency, or lockfile changes. (test/tsconfig/tsconfig.test.json:1, a345c46994f3)
  • Clean patch structure: The exact PR range has no whitespace errors, and a merge-tree inspection against current main found no concrete conflict or overlapping current-main change in the PR's files. (a345c46994f3)
  • Exact-head checks: GitHub reports 82 passing checks with no pending or failed checks on the current PR head. (a345c46994f3)
  • Rollout provenance: The same contributor previously landed the extension-test indexed-access phase, and this branch carries the remaining core-test phase from the umbrella rollout. (test/tsconfig/tsconfig.extensions.test.json:1, 81941f2d688b)

Likely related people:

  • steipete: Authored this core-test rollout, the merged extension-test phase, and the follow-up commit resolving the prior doctor-session review finding. (role: indexed-access rollout contributor; confidence: high; commits: b96c2d73f50f, 81b664f8b974, 81941f2d688b; files: test/tsconfig/tsconfig.test.json, test/tsconfig/tsconfig.extensions.test.json, src/commands/doctor-session-sqlite.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.
Review history (1 earlier review cycle)
  • reviewed 2026-07-12T13:12:08.818Z sha 8efd975 :: needs real behavior proof before merge. :: [P2] Finish migrating the doctor-session SQLite tests

@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 12, 2026
@clawsweeper

clawsweeper Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: chore(tooling): enforce indexed access in core tests This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

# Conflicts:
#	src/commands/doctor-session-sqlite.test.ts
@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. labels Jul 12, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready on a345c46994f393a72fe958bb406b5048a5ee6e70.

This closes the final core-test lane: the shared noUncheckedIndexedAccess: false opt-out is gone, redundant per-lane true overrides are gone, and 2,432 indexed-access diagnostics across 376 core test files are resolved with the established absence/invariant ladder.

Evidence:

  • Blacksmith Testbox tbx_01kxb2j72v773qhzk4dn9aq65c: node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental false --pretty false reached zero diagnostics; pnpm check:changed passed in 12m56s; pnpm test:changed passed 33 Vitest shards in 6m08s, including 2,783 agent tests.
  • Blacksmith Testbox tbx_01kxb752fvb2csxryq1z3fwza2 after merging current SQLite-session changes: strict core-test compile passed; pnpm test src/commands/doctor-session-sqlite.test.ts passed 62 tests with one platform skip.
  • Exact-head CI run 29194236196: all 51 executed jobs passed. Exact-head OpenGrep run 29194236250: passed.
  • Fresh autoreview covered the full change in seven disjoint bounded bundles plus focused follow-up reviews; no accepted/actionable findings remain.
  • OPENCLAW_TESTBOX=1 scripts/pr prepare-run 105375 passed with hosted_exact_or_recent_rebase gates. No known proof gaps remain.

@steipete
steipete merged commit 1b313dc into main Jul 12, 2026
124 of 128 checks passed
@steipete
steipete deleted the codex/nuia-core-test branch July 12, 2026 13:29
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 13, 2026
* test(tooling): enforce indexed access in core tests

* test(tui): constrain theme environment overrides

* test(doctor): enforce indexed access in migration fixtures
NEXTAltair added a commit to NEXTAltair/openclaw that referenced this pull request Nov 10, 2026
承認済みの cron.sessionGroup を復元する。設定すると、グループ未設定の
専用実行セッション (agent:<id>:cron:<job>) が実行時にそのサイドバー
グループへ入る。手動で付けたグループは新しい isolated 実行でも残す。
current-bound の実行セッションは独自に分類し、元の会話や配送先、
main/custom の会話ターゲットは動かさない。設定を外しても既存の割り当ては
消さない。グループの catalog 登録は、割り当てを保存した後にだけ行い、
失敗しても自動化は止めずに次の書き込みで再試行する。

退避ブランチ backup/personal-wip-20261029 (f82c572cdc4) の未コミット作業を
新しいベースへ載せ直した。コンフリクト解決:
- docs/automation/cron-jobs/managing-jobs.md: 上流 0738f13 (openclaw#177855) が
  「Disable automations」の段落を host 実行制限の説明に書き換えた。上流の
  段落を残し、その前に cron.sessionGroup の説明を置いた
- cron/isolated-agent/session.ts: 上流 f31b33f (openclaw#185070) が
  session-carried-model の import を追加。両方の import を残した
- cron/isolated-agent/session.test.ts: 上流 3655433 (openclaw#183506) が未使用の
  delivery fixture を削除。sessionGroup のテストだけを残し、fixture は戻さない
- session.test.ts の store 参照を、core テストの indexed access 規則
  (openclaw#105375) に合わせて optional chaining にした

rebase 時のコンフリクト解決 (onto 258d034, 元コミット b7547efa95e):
- src/config/zod-schema.root-shape.ts: 上流 87ff32d が
  repository-branch-prefix.js の import を追加。両方の import を残した
- docs/.generated/config-baseline.*: 上流版を基に counts の core を +1 (2587)。
  sha256 は依存を入れた別 worktree で pnpm config:docs:gen により再生成した
  (counts は +1 の値のまま一致)

rebase 時のコンフリクト解決 (onto 638a185, 元コミット d1e0995b1d7):
- 上流が cron に delivery / failureAlert (extend 形式) / agents / creators を追加した
  (zod-schema.root-shape.ts, schema.help.automation.ts, config-automation.md)。
  上流の定義はそのまま残し、sessionRetention の直後に sessionGroup を、
  help と許可キー一覧の文にも cron.sessionGroup を足した。
  上流の isValidCronExpression import と SESSION_LABEL_MAX_LENGTH import は両方残した。
- docs/.generated/config-baseline.*: counts は上流の core 2638 に本コミットの +1 を足して
  2639 とした。config-baseline.sha256 は上流版のまま (未再生成)。依存を入れた別 worktree で
  pnpm config:docs:gen を実行して再生成する必要がある (今回は install 禁止のため未実施)。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui cli CLI command changes commands Command implementations 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: XL 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