Skip to content

ci: add build-only GitHub Actions workflow (Node 20/22 matrix) - #3

Merged
noneck merged 2 commits into
mainfrom
ci/build-workflow
Jul 1, 2026
Merged

ci: add build-only GitHub Actions workflow (Node 20/22 matrix)#3
noneck merged 2 commits into
mainfrom
ci/build-workflow

Conversation

@noneck

@noneck noneck commented Jul 1, 2026

Copy link
Copy Markdown
Member

What

Adds .github/workflows/ci.yml — the first CI gate for this repo.

The workflow:

  • Triggers on pull_request and push to main, path-scoped to **/*.ts, package.json, and package-lock.json (no runs for docs-only or unrelated changes).
  • Sets permissions: contents: read (least-privilege).
  • Runs a build job across a Node 20.x / 22.x matrix with fail-fast: false, using actions/setup-node@v4 with npm caching.
  • Each matrix leg runs npm ci (clean, locked install) then npm run build (tsc).

Why

The six BetaNYC public MCP repos have had no CI test gate, unlike the Python tree in the main workspace. This adds a minimal compile gate so a TypeScript break can't merge silently.

Build-only, pending test coverage. This package has no test script yet, so the gate covers the build alone. When a test script is added, a npm test step should be appended to this workflow. This is noted in a header comment in the workflow file.

Node matrix rationale

package.json declares engines.node ">=18". The matrix tests both ends of the actively-maintained range — 20.x and 22.x. Node 18 is intentionally excluded (End-of-Life 2025-04-30). This mirrors the matrix convention already established in the sibling nyc-charter-laws-rules repo, keeping CI consistent across BetaNYC's MCP repos.

Verification

  • YAML validated (parses cleanly).
  • npm ci + npm run build run locally: build exits 0.

Scope

CI setup only. No source, dependency, or config changes.

Adds .github/workflows/ci.yml gating on `npm run build` (tsc) across a
20.x/22.x Node matrix, triggered on PRs and pushes to main scoped to TS
and package files. Build-only for now: the package has no test script yet.

Node 18 is intentionally excluded (EOL 2025-04-30), mirroring the matrix
convention already used in the sibling nyc-charter-laws-rules repo.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add `.github/workflows/**` to the pull_request and push path filters so
edits to the workflow itself re-trigger it, and add a permanent
`workflow_dispatch` trigger for on-demand re-runs. Without the path
addition, the PR that introduces this workflow never fires it (the diff
touches only files outside the filter), so the gate was never actually
exercised on GitHub Actions. Mirrors the fix landed in nyc-council-mcp PR #6.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@noneck

noneck commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

CI workflow verified with a real triggered run.

The workflow's own paths: filter did not include the workflow file, so the PR that introduces it never fired it (same gap fixed in nyc-council-mcp PR #6). Added .github/workflows/** to both the pull_request and push path filters (closing the self-trigger gap permanently) and a permanent workflow_dispatch trigger for manual re-runs.

Pushing that change fired a real pull_request run, watched to completion:

Build-only gate (no test script yet); both matrix cells green on the CI runner, confirming the compile passes in the runner environment, not just locally.

@noneck
noneck merged commit 361782d into main Jul 1, 2026
2 checks passed
noneck added a commit that referenced this pull request Jul 1, 2026
…) (#4)

Resolves the high-severity npm audit finding surfaced during CI setup
(PR #3). hono is pulled in transitively via @modelcontextprotocol/sdk;
the installed 4.12.21 fell in the vulnerable range (<=4.12.24).

npm audit fix bumps only the lockfile-pinned hono to 4.12.27, a
patch-level bump within hono 4.x. No manifest change; the SDK API is
untouched. npm ci + npm run build pass; npm audit reports 0
vulnerabilities.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
noneck added a commit that referenced this pull request Jul 6, 2026
…refresh

- Bump package.json/lockfile to 1.0.2.
- Server reads its version from package.json via createRequire instead of
  a hardcoded string.
- CHANGELOG: move Unreleased items into 1.0.2 (double-encoding fix #6,
  SoQL escaping + enum enforcement + NY-timezone today + error detail #7,
  hono bump #4, CI #3, release automation #8).
- README: Claude Code config updated to .mcp.json / claude mcp add;
  add npm test instructions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
noneck added a commit that referenced this pull request Jul 6, 2026
* fix: SoQL escaping, NY-timezone today, error detail

- Add soqlString() helper (quote-doubling) and use it in every $where
  builder: getNoticesByType, getNoticesByAgency, getNoticesByDateRange.
- Validate notice_type with z.enum (mirrors the advertised tool enum,
  now derived from a single NOTICE_TYPES constant) and date params as
  YYYY-MM-DD.
- getOpenSolicitations: compute "today" in America/New_York (nyToday())
  instead of UTC, which dropped same-day deadlines after 8pm ET.
- Include the (truncated, 300-char) Socrata error body in thrown errors.
- Live-verified 2026-07-06: dataset's distinct type_of_notice_description
  values exactly match the hardcoded lists/enum (10 values, plus null
  rows); all start_date values are midnight, so the <= end bound is
  correct (documented in code).
- Tests: escaping regressions, injected-clock NY-date checks (EDT/EST),
  error-body inclusion + truncation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore(release): 1.0.2 — version from package.json, changelog, README refresh

- Bump package.json/lockfile to 1.0.2.
- Server reads its version from package.json via createRequire instead of
  a hardcoded string.
- CHANGELOG: move Unreleased items into 1.0.2 (double-encoding fix #6,
  SoQL escaping + enum enforcement + NY-timezone today + error detail #7,
  hono bump #4, CI #3, release automation #8).
- README: Claude Code config updated to .mcp.json / claude mcp add;
  add npm test instructions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@noneck
noneck deleted the ci/build-workflow branch July 22, 2026 04:10
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.

1 participant