fix(profile-loader): quote @-plugin ids in YAML and add channel plugins - #42
fix(profile-loader): quote @-plugin ids in YAML and add channel plugins#42iret77 wants to merge 7 commits into
Conversation
The pinned migrations list in .github/workflows/ci.yml was stale: four files had moved from middleware/src/services/graph/migrations/ to the harness-knowledge-graph-neon package, and two had been renumbered (0007->0012, 0008->0013) as five new migrations were inserted ahead of them. The schema (migrations on pgvector) job has been failing since Actions were reactivated this morning. Replace the hardcoded array with a loop over five migration domains (graph, auth, routines, profileSnapshots, profileStorage). Files within a domain apply in lexical (numbered) order; domains apply in dependency order. New migrations are now picked up automatically without requiring a workflow edit.
middleware/package.json declares engines.node ">=22 <23" but .github/workflows/ci.yml pinned setup-node@v4 to node-version "20", which produced EBADENGINE during `npm ci` in the middleware and audit (middleware) jobs once Actions were reactivated.
middleware/src/index.ts line 398 declares channelRegistryRef as a forward reference that's assigned later in main() once the channel runtime is wired (around line 1783). eslint's prefer-const rule loses track of the reassignment across that distance and flags it. Disable the rule on that single line and document why.
Backfills the CHANGELOG entry that should have shipped with PR #31. Per AGENTS.md, ops-relevant changes must land with a same-step CHANGELOG note - the standards bootstrap qualified and didn't get one. Doubles as the first CI run after Actions were reactivated.
Adds the Fixed block to the Unreleased section covering the three pre-existing pipeline bugs that this PR also fixes (Node engine pin, stale schema-smoke migration list, prefer-const false positive on a forward reference). Connects the standards-bootstrap entry already in Added to the cleanup that became necessary once Actions were reactivated and CI started running again.
The schema, audit and lint jobs only fire when the PR base matches `branches:`. With `[main]` they don't run on cluster-fix PRs stacked on fix/ci-resurrection (#35 / issue #37), so each session can't verify its own effect. Widen the pull_request trigger to `['**']` for the duration of the test-suite resurrection. Push trigger stays on `[main]` because direct pushes to other branches are caught via the pull_request synchronize event anyway. Once #35 merges and the cluster work is done, this can revert to `branches: [main]`.
Two distinct fixes in the profileLoader cluster (Issue #37): 1. fix: YAML v2 rejects bare @ as a plain scalar (CODE-DRIFT-REGRESSION) yaml@^2.6.1 enforces strict YAML 1.2: @ is a reserved indicator and must be quoted when used as the first character of a plain scalar. All profile YAML files and test-fixture inline strings used unquoted plugin IDs like `- @omadia/memory`, producing: ProfileLoadError: YAML parse failed: Plain value cannot start with reserved character @ at line 6, column 5 Quote every @-prefixed plugin id in profiles/ and in test inline YAML. 2. fix: production.yaml missing two channel plugins (CODE-DRIFT-WEITER) test/profileLoader.test.ts asserts production profile has 8 plugins including `de.byte5.channel.teams` and `de.byte5.channel.telegram` (both referenced as constants in src/plugins/bootstrap.ts). The file was committed with only 6 plugins; the two channel entries were intended but omitted. Add them in the expected order.
da31abd to
8547b45
Compare
|
Superseded in part by #44 + needs reframing for the rest: YAML quoting fix is already in main (commit 0bcb1fd) — covers Adding byte5-private channel plugins to the public-OSS Closing — please reopen as a focused PR for just the channel-plugin question if you want to pursue that. |
Picked up from the now-closed #42 — the description-translation half of that PR was missed in my close. The YAML-quoting half of #42 was already folded into PR #44 via #44's commit 0bcb1fd, and the byte5 channel plugin IDs were already in main (only the @omadia/* entries needed quoting for YAML semantics; de.byte5.* don't start with a reserved char). This commit only translates the human-readable description strings — no plugin list changes, no behavioural changes. Tests still green.
|
Follow-up — picked up the description-translation half of this PR via #47 (just merged into main). My original close noted the YAML quoting half was already in main, but I missed that the German→English descriptions in |
Summary
Fixes ~12 failures in the profile-loader cluster (Issue #37).
Changes
middleware/profiles/production.yaml+minimal-dev.yamlyaml@^2.6.1enforces strict YAML 1.2:@is a reserved indicator character and mustbe quoted when it starts a plain scalar. Both profile files used bare
@omadia/...pluginIDs, causing
ProfileLoadError: Plain value cannot start with reserved character @forevery test that loads a built-in profile. Fixed by quoting all
@-prefixed plugin IDs.Additionally,
production.yamlwas missingde.byte5.channel.teamsandde.byte5.channel.telegram. Both are referenced as constants insrc/plugins/bootstrap.ts(
TEAMS_CHANNEL_ID/TELEGRAM_CHANNEL_ID) and belong in the production profile.The loader test asserts 8 plugins; the file had 6.
test/profileLoader.test.ts+test/profilesRouter.test.tsSame quoting fix for inline YAML strings written to temp files in test fixtures.
Test plan
profileLoader / built-in profilesall greenprofileLoader / object-form entries with configgreenprofileLoader / invalid inputs → rejects duplicate plugin idsgreenprofilesRouterall greenDrives ~12 of the ~100 remaining failures to zero. Other clusters tracked in #37.