Skip to content

Add mcode-trajectory-studio: read-only session trajectory inspection via the runtime SQLite projection #1

Add mcode-trajectory-studio: read-only session trajectory inspection via the runtime SQLite projection

Add mcode-trajectory-studio: read-only session trajectory inspection via the runtime SQLite projection #1

# CI evidence for mcode-trajectory-studio.
#
# `[code]smith` is SKIPPED on this repository, so this workflow is the CI evidence
# for this plugin's review rounds — the same substitution
# `.github/workflows/tool-map-windows.yml` and
# `.github/workflows/mcode-island-windows.yml` already make for theirs.
#
# Three claims in the manifest and the READMEs are otherwise only asserted in prose,
# and each one gets a job here so a reader can check it instead of trusting it:
#
# 1. "Node.js 22.13.0 or newer, verified on >=22.19 <23 || >=24 <27"
# -> `compat-matrix` runs the suite on the floor, on the verified range's own
# lower bounds, and on the current releases, and fails unless each release
# behaves the way the manifest says it does. FTS5 is not monotonic in the
# Node version (22.13.0-22.18.x and all 23.x bundle a SQLite without it), so
# a single-version job would prove the wrong thing.
#
# 2. "macOS and Windows verified"
# -> `platforms` runs the whole suite on windows-latest and macos-latest. This
# is the cross-platform claim that a hand-run cannot keep true over time:
# a later change to path handling would still pass on Linux.
#
# 3. "Below 22.13.0 the Plugin exits with a readable message"
# -> `floor-guard` installs 22.12.0 and asserts the process refuses to start
# *and* says why, rather than dying inside the module loader.
#
# Scope note: this workflow runs only this plugin's own suite. It deliberately does
# not run the repository-wide `npm run check`, for the reason recorded in `ci.yml` —
# a repository-wide job on a single platform is what made an unrelated plugin's
# frontmatter bug block a previous PR's Windows evidence.
name: mcode-trajectory-studio
on:
pull_request:
paths:
- 'plugins/weekbin/mcode-trajectory-studio/**'
- '.github/workflows/mcode-trajectory-studio.yml'
push:
branches: [main]
paths:
- 'plugins/weekbin/mcode-trajectory-studio/**'
- '.github/workflows/mcode-trajectory-studio.yml'
permissions:
contents: read
jobs:
compat-matrix:
name: node ${{ matrix.node }} compatibility
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
# Every release has to report, so the log is the table rather than the first
# failure.
fail-fast: false
matrix:
# The floor, the first release of each verified range, and the current
# release of each maintained line.
node: ['22.13.0', '22.19.0', '22.x', '24.0.0', '24.x']
defaults:
run:
working-directory: plugins/weekbin/mcode-trajectory-studio
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node }}
- name: Assert this release behaves as the manifest claims
run: node tools/compat-matrix.mjs
- name: MCP handshake and doctor diagnostics
# The protocol suite inside `node --test` covers the wire contract; this
# step additionally proves the documented entry point runs headless.
run: node server/main.mjs --doctor
platforms:
name: ${{ matrix.os }} suite
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
defaults:
run:
working-directory: plugins/weekbin/mcode-trajectory-studio
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '24.x'
- name: Full suite on this platform
run: node --test
- name: Assert this platform behaves as the manifest claims
run: node tools/compat-matrix.mjs
floor-guard:
name: node 22.12.0 is refused with a reason
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
working-directory: plugins/weekbin/mcode-trajectory-studio
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '22.12.0'
- name: The process must refuse, and say why
shell: bash
run: |
set -uo pipefail
if output=$(node server/main.mjs --doctor 2>&1); then
echo "::error::the Plugin started on Node 22.12.0, where node:sqlite does not exist"
echo "$output"
exit 1
fi
echo "$output"
# A bare module-resolution crash would also exit non-zero; the message is
# the part a user can act on, so it is asserted too.
grep -q 'requires Node.js 22.13.0 or newer' <<<"$output"
grep -q 'node:sqlite' <<<"$output"