fix(brain,vision): strict-mode type correctness + clear pre-existing lint debt#17
Merged
Merged
Conversation
…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
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
Follow-up to #15 (which merged the portal + brain + vision feature into
main). This lands the two deltas that weren't in that merge:fix(brain,vision)— strict-mode correctness for the mergedcore/brain+core/visionmodules. The merged copies violate the repo'sexactOptionalPropertyTypesandnoUncheckedIndexedAccesssettings (assigningundefinedto optional props; unguarded regex-group / array-index access in the VISION.md parser and loop selection). esbuild/vitest don't catch these; a scopedtscpass does.chore(lint)—prettier --writeover 5 files (hermes-sm.ts,daemon/*) carrying pre-existingprettier/prettierviolations that fail the full-repoeslintstep.mainis currently red on these; this clears them. No behavior change.Verification
eslint: 0 errors (was 146).npm run build: green.tscover the changed modules + tests: clean (the fullnpm run typecheckOOMs 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