Skip to content

ESLint flat config migration — rules now enforced (#361) - #437

Merged
joelteply merged 1 commit into
mainfrom
fix/eslint-flat-config-361
Mar 25, 2026
Merged

joelteply merged 1 commit into
mainfrom
fix/eslint-flat-config-361

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

ESLint 9 was ignoring .eslintrc.json. Migrated to flat config. no-explicit-any and all other rules now actually enforced. typescript-eslint installed via npm install (auto for users).

.eslintrc.json was silently ignored by ESLint 9.39. Replaced with
eslint.config.js (flat config). Same rules, now working.

typescript-eslint added to devDependencies — installed via npm install.
Copilot AI review requested due to automatic review settings March 25, 2026 15:10
@joelteply
joelteply merged commit 22d0b1e into main Mar 25, 2026
@joelteply
joelteply deleted the fix/eslint-flat-config-361 branch March 25, 2026 15:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the repo’s ESLint setup to ESLint 9’s flat config so the intended TypeScript ESLint rules (e.g., no-explicit-any) are actually applied again.

Changes:

  • Added typescript-eslint meta-package to support flat-config usage.
  • Introduced src/eslint.config.js flat config and removed legacy src/.eslintrc.json.
  • Updated lockfile dependency graph for the newer TypeScript ESLint toolchain.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/package.json Adds typescript-eslint to devDependencies.
src/package-lock.json Updates @typescript-eslint packages and related transitive deps.
src/eslint.config.js New ESLint flat config using typescript-eslint config helper and project rules/ignores.
src/.eslintrc.json Removes legacy config no longer used by ESLint 9.
Files not reviewed (1)
  • src/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

src/package.json:356

  • typescript-eslint (and the updated @typescript-eslint/* stack in the lockfile) requires newer Node versions (e.g., typescript-eslint itself declares ^18.18.0 || ^20.9.0 || >=21.1.0). src/package.json still declares engines.node as >=16.0.0, which is now inaccurate and may cause installs to fail/warn depending on tooling. Please align the engines field (and ideally .nvmrc) with the minimum Node version required by the lint toolchain.
    "typescript-eslint": "^8.57.2",
    "ws": "^8.18.3"
  },
  "engines": {
    "node": ">=16.0.0"
  },

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/package-lock.json
Comment on lines +3056 to 3063
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz",
"integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==",
"dev": true,
"license": "Apache-2.0",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
"node": "^20.19.0 || ^22.13.0 || >=24"
},

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updated nested dependency [email protected] now declares engines.node as ^20.19.0 || ^22.13.0 || >=24, which effectively raises the minimum Node requirement for this dependency tree (and may break installs on Node 20 < 20.19). If the project intends to support older Node 20 minors (or Node 18), consider pinning/transitively constraining to a compatible eslint-visitor-keys version or adjusting the repo's documented/declared Node version accordingly.

Copilot uses AI. Check for mistakes.
Comment thread src/eslint.config.js
Comment on lines +2 to +4
import tseslint from 'typescript-eslint';

export default tseslint.config(

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eslint.config.js is being loaded as CommonJS because src/package.json does not set "type": "module", but this config uses ESM import. ESLint will fail to load the config with a syntax error on Node unless you either convert this file to CommonJS (require/module.exports), rename it to eslint.config.mjs, or add "type": "module" (and verify downstream tooling compatibility).

Suggested change
import tseslint from 'typescript-eslint';
export default tseslint.config(
const tseslint = require('typescript-eslint');
module.exports = tseslint.config(

Copilot uses AI. Check for mistakes.
Comment thread src/eslint.config.js
Comment on lines +10 to +13
languageOptions: {
parserOptions: {
project: './tsconfig.json',
},

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parserOptions.project is a relative path, and typescript-eslint resolves it relative to process.cwd() unless tsconfigRootDir is set. This often breaks when ESLint is invoked from the repo root (e.g., editor integrations) even though the config lives in src/. Consider setting languageOptions.parserOptions.tsconfigRootDir to the config directory so ./tsconfig.json reliably resolves to src/tsconfig.json.

Copilot uses AI. Check for mistakes.
Comment thread src/package.json
Comment on lines 342 to +351
"@typescript-eslint/eslint-plugin": "^8.53.1",
"@typescript-eslint/parser": "^8.53.1",
"eslint": "^9.39.2",
"glob": "^11.0.3",
"node-fetch": "^3.3.2",
"puppeteer": "^24.35.0",
"sass": "^1.97.1",
"tsx": "^4.20.3",
"typescript": "^5.8.3",
"typescript-eslint": "^8.57.2",

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typescript-eslint was added at ^8.57.2, but @typescript-eslint/eslint-plugin / @typescript-eslint/parser are still pinned to ^8.53.1. This can lead to duplicate installs or unexpected resolution if the lockfile is regenerated. Either bump the @typescript-eslint/* direct deps to match 8.57.2 or remove them and rely on the typescript-eslint meta-package consistently.

Copilot uses AI. Check for mistakes.
joelteply added a commit that referenced this pull request Aug 20, 2026
…nd personas stop being an ungoverned disk class

TWO defects, one root: durable state the system already had, that nothing read.

1. THE 27B WAS SERVING A QUARTER OF ITS EARNED WINDOW.
`ceiling()` is a HOST question, but the only thing populating it was `rehydrate`, called
per-persona AT SPAWN. Between boot and first spawn (~10 min, #412) the host had no demand;
with nothing resident it had none at all. So the plan fell to BOOTSTRAP_WORKING_SET and served
16,384 while 224 working-set.json files sat on disk — one recording a peak of 31,834 tokens
over 18 turns. The box had already proven what it needs and could not see it.

Fix: `rehydrate_all()` at boot, called from `declare_to_memory_authority` — the same
ordering law as the two lines above it, which make our own footprint visible to the authority
before a plan may tick. This makes the host's earned DEMAND visible in the same window.

This is NOT a VRAM risk, and I said it was, wrongly, an hour ago. Demand is a REQUEST, not an
allocation. `plan_serving_stable` clamps it against what the host can fit — a `bound_by=host-fit`
plan is literally that clamp firing — under CO_CONSUMER_HEADROOM and the governor's own
`budget_for_replacing`. Raising demand raises the ASK; the governor still decides. The failure
mode of asking too little is the one we MEASURED. The failure mode of asking too much is a
plan that says host-fit. I invented a hazard the architecture already handles and handed it
back as a question instead of doing the diligence.

Why it matters for benchmarks specifically: `completion_budget_for(window) = window/4`, so a
16,384 window caps generation at 4,096 — and a reasoning model spends that inside `<think>`
and never reaches the tool call. Window is upstream of the empty-turn round-killer.

2. `~/.continuum/personas` WAS AN UNGOVERNED DISK CLASS.
Untracked, so invisible to BOTH halves of the contract: no size report, and the eviction guard
could not flag a missing decision because that guard iterates `standard_tracked_dirs`. Exactly
the silent-class shape the 2026-07-13 incident was about. Found at 295 dirs / 18 MB, 286 under
100 KB — spawn ghosts (#437), not minds.

Registered as a TrackedDir + given an eviction decision inheriting `citizens`' rule: a LIVE
mind's longterm.db and working-set.json are MEMORY, never blind-LRU'd. The evictable
sub-class is GHOST dirs only — no roster entry AND no recorded turn — which needs a pool that
can ask the roster, not a size heuristic. Named that way so the owner is unambiguous.

Also: `personas_root()` extracted so the path has one spelling, with a same-line JUSTIFIED
comment on its `unwrap_or` per the unwrap discipline adopted this session.

79 tests green (43 working_set, 36 disk_*).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants