Skip to content

chore: drop banned typecheck paths and fix broken npm scripts - #6452

Open
daggerstuff wants to merge 2 commits into
stagingfrom
cursor/drop-banned-typecheck-fix-scripts-9af7
Open

daggerstuff wants to merge 2 commits into
stagingfrom
cursor/drop-banned-typecheck-fix-scripts-9af7

Conversation

@daggerstuff

@daggerstuff daggerstuff commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Summary

Subtraction-first cleanup: remove banned root astro check / tsc npm scripts, fix stale doc references, and repair or delete broken script targets. No new tooling.

Script / doc changes

Item Action Why
typecheck, typecheck:strict, type-check, check, check:all Removed Banned by AGENTS.md / CONTRIBUTING.md (OOM); no validate-typescript* target for typecheck:strict
ts:check:debug, ts:check:main, ts:check:aws, ts:compare Removed ts:check:* family uses tsc; ts:compare depended on removed scripts
safe:typecheck Removed Called removed typecheck
jules:check Repointed Still enforces staging branch; runs pnpm lint instead of check:all
tags:* Repointed scripts/utils/tag-manager.cjs (single CJS entry; removed duplicate .js under "type": "module")
tags:maintenance Removed No scripts/tag-maintenance.js anywhere
version:release, version:info Removed No scripts/version-manager.js anywhere
mcp:list, mcp:run, mcp:manage Removed No scripts/mcp-manager.js; mcp:installer kept
blog Repointed scripts/content/blog-web.js; fixed instrument.mjs import to config/instrument.mjs so the path resolves
dev:all-services Repointed Dropped missing scripts/dev/health-check.sh prefix; concurrent service start unchanged
typecheck:python, lint*, ts:debug* Kept In policy (Python mypy script / oxlint) or out of scope
GEMINI.md Updated oxlint-only lint; no pnpm typecheck
reasonix.toml [permissions] allow Cleared Removed allowed astro check / typecheck bash patterns
setup.md, development-setup.md Updated Point at pnpm lint; removed typecheck bullet
fix-ts-errors.sh, ts-error-docs.md Deleted Unreferenced; promoted banned tsc workflow
.devcontainer/devcontainer.json Updated Comment matches packageManager ([email protected])
Makefile typecheck / check-all Repointed Were callers of removed scripts; now run pnpm lint

Out of scope (not changed; still mention banned commands)

  • scripts/devops/aggregate-readiness.py still invokes pnpm typecheck for readiness lanes
  • Various agent READMEs / devops scripts mention pnpm typecheck in comments or checklists
  • Package-level typecheck scripts in workspace packages (e.g. agents) unchanged

Verification

  • pnpm lint — pass (Node 24.20.0)
  • node scripts/utils/tag-manager.cjs — usage prints (path resolves)
  • node scripts/content/blog-web.js — starts UI (path + import resolve)
  • pnpm test:unit — 2 pre-existing failures only: graphql.test.ts (suite), versioning.test.ts (6-month sunset assertion); no new failures vs staging
Open in Web Open in Cursor 

Summary by Sourcery

Remove unsupported type-checking commands and clean up broken or obsolete development scripts while standardizing validation on the repository lint workflow.

Bug Fixes:

  • Repair broken npm script paths and imports so tag management, blog tooling, and all-service startup commands resolve correctly.

Enhancements:

  • Remove banned root TypeScript and Astro type-check scripts and replace dependent Makefile and Jules checks with the supported lint workflow.
  • Remove obsolete scripts for version management, MCP management, tag maintenance, and unused TypeScript error workflows.
  • Update development documentation and agent permissions to reference the lint-based validation workflow.

Documentation:

  • Update setup and development guidance to use oxlint-based linting instead of the removed type-check commands.

Tests:

  • Verify linting and repaired script entry points, with unit tests showing only pre-existing failures.

Chores:

  • Align the devcontainer package-manager comment with the configured pnpm version.

Remove root astro check/tsc scripts and stale docs references; repoint
broken npm script paths; align agent/devcontainer docs with oxlint-only lint.
@vercel

vercel Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pixelated Ready Ready Preview Oct 31, 2026 8:45am UTC

Request Review

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 31, 2026
@sourcery-ai

sourcery-ai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer's Guide

This cleanup removes banned and broken root typecheck workflows, redirects surviving validation and utility commands to valid lint or script targets, deletes obsolete tooling, and updates documentation and permissions to match the new workflow. Review the package-script dependency changes closely, especially the intentionally unchanged out-of-scope references to pnpm typecheck and the reported pre-existing test failures.

Flow diagram for updated validation scripts

flowchart LR
    A["Developer or Jules"] --> B["pnpm lint"]
    B --> C["oxlint and repository lint gates"]
    D["Makefile typecheck/check-all"] --> B
    E["jules:check"] --> B
Loading

File-Level Changes

Change Details Files
Removed banned root TypeScript-checking commands and their dependent workflows.
  • Deleted root typecheck/check variants, safe:typecheck, and ts:check variants that invoke tsc or astro check.
  • Repointed Makefile targets and Jules validation to pnpm lint.
  • Removed obsolete TypeScript error-fixing artifacts and cleared matching Reasonix permissions.
package.json
Makefile
reasonix.toml
apps/web/src/scripts/fix-ts-errors.sh
apps/web/src/scripts/ts-error-docs.md
Repaired remaining npm script paths and removed scripts whose target files do not exist.
  • Pointed tag commands at the CommonJS tag manager and removed its duplicate module-format implementation.
  • Removed missing tag maintenance, version manager, and MCP manager commands while retaining the installer.
  • Fixed blog and instrumentation paths and removed the missing health-check prerequisite from the all-services command.
package.json
scripts/utils/tag-manager.cjs
scripts/utils/tag-manager.js
scripts/content/blog-web.js
Updated developer-facing documentation to reflect lint-based validation.
  • Replaced root typecheck guidance with oxlint-based lint guidance.
  • Updated setup documentation and agent instructions to remove stale pnpm typecheck references.
  • Aligned the devcontainer package-manager comment with the configured pnpm version.
GEMINI.md
apps/web/src/content-store/docs/development-setup.md
apps/web/src/content-store/docs/getting-started/setup.md
.devcontainer/devcontainer.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions

Copy link
Copy Markdown

px Advisor Review

Risk: unknown

No summary available

No findings.

Comment thread package.json
Comment on lines 89 to 99
"lint:markdown:ci:all": "pnpm exec markdownlint --config .markdownlint.json --ignore node_modules --ignore '**/node_modules/**' \"**/*.md\" \"**/*.mdx\"",
"lint:fix": "oxlint -c .oxlintrc.json --fix-dangerously . && pnpm lint:no-suppressions",
"typecheck": "NODE_OPTIONS='--max-old-space-size=8192' astro check && NODE_OPTIONS='--max-old-space-size=8192' tsc --noEmit",
"typecheck:strict": "NODE_OPTIONS='--max-old-space-size=8192' tsx scripts/validate-typescript.ts",
"type-check": "pnpm run typecheck",
"check": "NODE_OPTIONS='--max-old-space-size=8192' astro check",
"check:all": "pnpm run check && pnpm run typecheck",
"ts:debug": "./debug-typescript.sh normal",
"ts:debug:verbose": "./debug-typescript.sh verbose",
"ts:debug:minimal": "./debug-typescript.sh minimal",
"ts:debug:clean": "./debug-typescript.sh clean",
"ts:debug:repro": "./debug-typescript.sh repro",
"ts:debug:monitor": "./debug-typescript.sh monitor",
"ts:check:debug": "tsc --noEmit --project config/tsconfig.debug.json",
"ts:check:main": "tsc --noEmit --project config/tsconfig.json",
"ts:check:aws": "tsc --noEmit --project config/tsconfig.aws.json",
"ts:compare": "pnpm run ts:check:debug && echo '✅ Debug config works' && pnpm run ts:check:main && echo '✅ Main config works'",
"ts:switch:debug": "cp config/tsconfig.json config/tsconfig.json.backup && cp config/tsconfig.debug.json config/tsconfig.json",
"ts:switch:main": "cp config/tsconfig.json.backup config/tsconfig.json",
"ts:logs": "echo 'TypeScript logs location varies by system. Run: ./debug-typescript.sh normal'",

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.

Bug: Removal of root typecheck scripts breaks scripts/devops/aggregate-readiness.py, causing the /readiness API route to return 503 and breaking run-final-tests.sh.
Severity: HIGH

Suggested Fix

Retain or alias the typecheck scripts in package.json, or update scripts/devops/aggregate-readiness.py and scripts/testing/run-final-tests.sh to use the updated typecheck command.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: package.json#L88-L99

Potential issue: Removing root scripts such as `typecheck`, `check`, `check:all`, and
`safe:typecheck` breaks dependent scripts and endpoints.
`scripts/devops/aggregate-readiness.py` runs `pnpm typecheck`, which now fails with a
missing script error. Consequently, the live `/readiness` API endpoint
(`apps/web/src/api/routes/readiness.ts`) always fails and returns HTTP 503 'not-ready'.
Additionally, `scripts/testing/run-final-tests.sh` executes `npm run typecheck` with
`set -e`, aborting test execution prior to stopping the background server process.

Did we get this right? 👍 / 👎 to inform future reviews.

@sourcery-ai sourcery-ai Bot 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.

Hey - I've found 4 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="scripts/content/blog-web.js" line_range="14" />
<code_context>
 /* jshint esversion: 6, node: true */
 // IMPORTANT: Import Sentry instrumentation first
-import '../instrument.mjs'
+import '../../config/instrument.mjs'

 // Get current directory
</code_context>
<issue_to_address>
**Unauthenticated blog UI exposes local content**

When a developer runs `pnpm blog` on a machine reachable by other network users, `server.listen(PORT)` accepts connections on all interfaces, and the request handler has no authentication: a network caller can retrieve blog status/report output or send `action=generate` to write draft files into the workspace. The fixed import makes this interface startable via `pnpm blog`, exposing local content and allowing unauthorized changes.

Bind the UI to `127.0.0.1` and require authentication for any operation that reads or changes workspace content.
</issue_to_address>

### Comment 2
<location path="package.json" line_range="91" />
<code_context>
     "lint:markdown:ci": "node scripts/ci/lint-changed.mjs --markdown",
     "lint:markdown:ci:all": "pnpm exec markdownlint --config .markdownlint.json --ignore node_modules --ignore '**/node_modules/**' \"**/*.md\" \"**/*.mdx\"",
     "lint:fix": "oxlint -c .oxlintrc.json --fix-dangerously . && pnpm lint:no-suppressions",
-    "typecheck": "NODE_OPTIONS='--max-old-space-size=8192' astro check && NODE_OPTIONS='--max-old-space-size=8192' tsc --noEmit",
-    "typecheck:strict": "NODE_OPTIONS='--max-old-space-size=8192' tsx scripts/validate-typescript.ts",
-    "type-check": "pnpm run typecheck",
</code_context>
<issue_to_address>
**Removed scripts break validation**

When readiness, final tests, GitLab validation, or docs deployment runs, `run_typecheck` and the readiness aggregator invoke the removed `typecheck` script, GitLab invokes the removed `check` script, docs invokes the removed `safe:typecheck` script, and `run-final-tests.sh` also calls `typecheck`; readiness reports not-ready or returns 503, and validation fails or is skipped.

Update all affected callers to supported validation commands and retain a valid docs typecheck step.

Also at `package.json:24`, `package.json:94`, `package.json:219`.
</issue_to_address>

### Comment 3
<location path="package.json" line_range="210" />
<code_context>
-    "tags:maintenance": "node scripts/tag-maintenance.js full-maintenance",
-    "version:release": "node scripts/version-manager.js release",
-    "version:info": "node scripts/version-manager.js info",
+    "tags:create": "node scripts/utils/tag-manager.cjs create",
+    "tags:list": "node scripts/utils/tag-manager.cjs list",
+    "tags:validate": "node scripts/utils/tag-manager.cjs validate",
</code_context>
<issue_to_address>
**Concurrent tag creates lose rollback requests**

When two callers create a tag for the same environment within one second, `tag-manager.cjs` generates the same second-resolution tag name for both creates, so one `git tag -a` fails because the tag already exists and its rollback request is not recorded.

Generate a unique tag name for each create.
</issue_to_address>

### Comment 4
<location path="package.json" line_range="211" />
<code_context>
-    "version:release": "node scripts/version-manager.js release",
-    "version:info": "node scripts/version-manager.js info",
+    "tags:create": "node scripts/utils/tag-manager.cjs create",
+    "tags:list": "node scripts/utils/tag-manager.cjs list",
+    "tags:validate": "node scripts/utils/tag-manager.cjs validate",
+    "tags:cleanup": "node scripts/utils/tag-manager.cjs cleanup",
</code_context>
<issue_to_address>
**Advertised tag commands fail**

When a caller runs one of the `pnpm tags:*` scripts, `tag-manager.cjs` handles only `create` and `validate`, so `tags:list` and `tags:cleanup` fall through to `usage()` and exit with status 1; `tags:create` and `tags:validate` also exit with usage unless an environment argument is supplied. Callers cannot perform the advertised tag operations.

Implement `list` and `cleanup` in `tag-manager.cjs` and ensure the `create` and `validate` scripts receive the required environment argument.

Also at `package.json:212-213`.
</issue_to_address>

Fix all in Cursor

Sourcery assessment

Approval pending. 4 findings to address first.

Blocking findings: scripts/content/blog-web.js:14, package.json:91, package.json:210, package.json:211


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

/* jshint esversion: 6, node: true */
// IMPORTANT: Import Sentry instrumentation first
import '../instrument.mjs'
import '../../config/instrument.mjs'

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.

🟡 Medium · Unauthenticated blog UI exposes local content

When a developer runs pnpm blog on a machine reachable by other network users, server.listen(PORT) accepts connections on all interfaces, and the request handler has no authentication: a network caller can retrieve blog status/report output or send action=generate to write draft files into the workspace. The fixed import makes this interface startable via pnpm blog, exposing local content and allowing unauthorized changes.

Bind the UI to 127.0.0.1 and require authentication for any operation that reads or changes workspace content.

Prompt for AI agents
In `scripts/content/blog-web.js` at line 14:

**Unauthenticated blog UI exposes local content**

When a developer runs `pnpm blog` on a machine reachable by other network users, `server.listen(PORT)` accepts connections on all interfaces, and the request handler has no authentication: a network caller can retrieve blog status/report output or send `action=generate` to write draft files into the workspace. The fixed import makes this interface startable via `pnpm blog`, exposing local content and allowing unauthorized changes.

Bind the UI to `127.0.0.1` and require authentication for any operation that reads or changes workspace content.

Fix in Cursor

Comment thread package.json
"lint:markdown:ci": "node scripts/ci/lint-changed.mjs --markdown",
"lint:markdown:ci:all": "pnpm exec markdownlint --config .markdownlint.json --ignore node_modules --ignore '**/node_modules/**' \"**/*.md\" \"**/*.mdx\"",
"lint:fix": "oxlint -c .oxlintrc.json --fix-dangerously . && pnpm lint:no-suppressions",
"typecheck": "NODE_OPTIONS='--max-old-space-size=8192' astro check && NODE_OPTIONS='--max-old-space-size=8192' tsc --noEmit",

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.

🔴 Critical · Removed scripts break validation

When readiness, final tests, GitLab validation, or docs deployment runs, run_typecheck and the readiness aggregator invoke the removed typecheck script, GitLab invokes the removed check script, docs invokes the removed safe:typecheck script, and run-final-tests.sh also calls typecheck; readiness reports not-ready or returns 503, and validation fails or is skipped.

Update all affected callers to supported validation commands and retain a valid docs typecheck step.

Also at package.json:24, package.json:94, package.json:219.

Prompt for AI agents
In `package.json` at line 91:

**Removed scripts break validation**

When readiness, final tests, GitLab validation, or docs deployment runs, `run_typecheck` and the readiness aggregator invoke the removed `typecheck` script, GitLab invokes the removed `check` script, docs invokes the removed `safe:typecheck` script, and `run-final-tests.sh` also calls `typecheck`; readiness reports not-ready or returns 503, and validation fails or is skipped.

Update all affected callers to supported validation commands and retain a valid docs typecheck step.

Also at `package.json:24`, `package.json:94`, `package.json:219`.

From .github/copilot-instructions.md L14-15:

- **Surgical Edits**: Keep changes minimal, safe, tightly scoped. Write clear,
  self-documenting code. Remove only what your edits make obsolete.

Fix in Cursor

Comment thread package.json
"tags:maintenance": "node scripts/tag-maintenance.js full-maintenance",
"version:release": "node scripts/version-manager.js release",
"version:info": "node scripts/version-manager.js info",
"tags:create": "node scripts/utils/tag-manager.cjs create",

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.

🟡 Medium · Concurrent tag creates lose rollback requests

When two callers create a tag for the same environment within one second, tag-manager.cjs generates the same second-resolution tag name for both creates, so one git tag -a fails because the tag already exists and its rollback request is not recorded.

Generate a unique tag name for each create.

Prompt for AI agents
In `package.json` at line 210:

**Concurrent tag creates lose rollback requests**

When two callers create a tag for the same environment within one second, `tag-manager.cjs` generates the same second-resolution tag name for both creates, so one `git tag -a` fails because the tag already exists and its rollback request is not recorded.

Generate a unique tag name for each create.

Fix in Cursor

Comment thread package.json
"version:release": "node scripts/version-manager.js release",
"version:info": "node scripts/version-manager.js info",
"tags:create": "node scripts/utils/tag-manager.cjs create",
"tags:list": "node scripts/utils/tag-manager.cjs list",

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.

🟡 Medium · Advertised tag commands fail

When a caller runs one of the pnpm tags:* scripts, tag-manager.cjs handles only create and validate, so tags:list and tags:cleanup fall through to usage() and exit with status 1; tags:create and tags:validate also exit with usage unless an environment argument is supplied. Callers cannot perform the advertised tag operations.

Implement list and cleanup in tag-manager.cjs and ensure the create and validate scripts receive the required environment argument.

Also at package.json:212-213.

Prompt for AI agents
In `package.json` at line 211:

**Advertised tag commands fail**

When a caller runs one of the `pnpm tags:*` scripts, `tag-manager.cjs` handles only `create` and `validate`, so `tags:list` and `tags:cleanup` fall through to `usage()` and exit with status 1; `tags:create` and `tags:validate` also exit with usage unless an environment argument is supplied. Callers cannot perform the advertised tag operations.

Implement `list` and `cleanup` in `tag-manager.cjs` and ensure the `create` and `validate` scripts receive the required environment argument.

Also at `package.json:212-213`.

From .github/copilot-instructions.md L14-15:

- **Surgical Edits**: Keep changes minimal, safe, tightly scoped. Write clear,
  self-documenting code. Remove only what your edits make obsolete.

Fix in Cursor

@github-actions

Copy link
Copy Markdown

Lighthouse CI Results

Routes audited: /, /dashboard?perf=1, /training-session

Thresholds: Performance ≥90 | Accessibility ≥90 | Best Practices ≥85

Reports

  • lhr-1793436091966
  • lhr-1793436103713
  • lhr-1793436115094
  • lhr-1793436125936
  • lhr-1793436136708
  • lhr-1793436147485
  • lhr-1793436158221
  • lhr-1793436168938
  • lhr-1793436179845

Reports are also available as workflow artifacts

This branch was successfully deployed

1 active deployment
Preview — fcaeb039 Deployed Oct 31, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants