Skip to content

fix(brain,vision): strict-mode type correctness + clear pre-existing lint debt#17

Merged
jonathanpeterwu merged 2 commits into
mainfrom
fix/brain-vision-strict-types
Jun 8, 2026
Merged

fix(brain,vision): strict-mode type correctness + clear pre-existing lint debt#17
jonathanpeterwu merged 2 commits into
mainfrom
fix/brain-vision-strict-types

Conversation

@jonathanpeterwu

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #15 (which merged the portal + brain + vision feature into main). This lands the two deltas that weren't in that merge:

  1. fix(brain,vision) — strict-mode correctness for the merged core/brain + core/vision modules. The merged copies violate the repo's exactOptionalPropertyTypes and noUncheckedIndexedAccess settings (assigning undefined to optional props; unguarded regex-group / array-index access in the VISION.md parser and loop selection). esbuild/vitest don't catch these; a scoped tsc pass does.
  2. chore(lint)prettier --write over 5 files (hermes-sm.ts, daemon/*) carrying pre-existing prettier/prettier violations that fail the full-repo eslint step. main is currently red on these; this clears them. No behavior change.

Verification

  • Full-repo eslint: 0 errors (was 146).
  • npm run build: green.
  • Tests: 42 pass (14 brain, 13 vision, 15 portal).
  • Scoped tsc over the changed modules + tests: clean (the full npm run typecheck OOMs at the repo's 8 GB heap in CI — unrelated to this change).

Context

Supersedes the leftover commits on #16, which is closed as redundant now that #15 is merged.

https://claude.ai/code/session_01Gk8DiqCeG9uMaWT9RprwP1


Generated by Claude Code

claude added 2 commits June 8, 2026 22:30
…dexedAccess

The whole-repo typecheck OOMs in this environment; a scoped tsc pass over the
new modules surfaced strict-mode violations esbuild/vitest don't catch:

- exactOptionalPropertyTypes: stop assigning undefined to optional props
  (conditional spreads for supersededBy/refs/error/query fields; splitList
  now returns string[])
- noUncheckedIndexedAccess: guard regex-group and array-index access in the
  VISION.md parser and the loop's objective selection
- tidy strict index access in the brain/vision tests

Scoped typecheck (source + tests) now passes clean; 42 tests still green.

https://claude.ai/code/session_01Gk8DiqCeG9uMaWT9RprwP1
CI lints the whole repo (eslint 'src/**/*.ts'); 146 pre-existing
prettier/prettier errors in files unrelated to this PR were failing the
lint job (main is red for the same reason). Auto-formats the 5 offending
files so PR CI can go green. No behavior change.

https://claude.ai/code/session_01Gk8DiqCeG9uMaWT9RprwP1
@jonathanpeterwu jonathanpeterwu merged commit 1a8d850 into main Jun 8, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants