Skip to content

fix(profile-loader): quote @-plugin ids in YAML and add channel plugins - #42

Closed
iret77 wants to merge 7 commits into
fix/ci-resurrectionfrom
fix/profile-loader-yaml-syntax
Closed

fix(profile-loader): quote @-plugin ids in YAML and add channel plugins#42
iret77 wants to merge 7 commits into
fix/ci-resurrectionfrom
fix/profile-loader-yaml-syntax

Conversation

@iret77

@iret77 iret77 commented May 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes ~12 failures in the profile-loader cluster (Issue #37).

  • Cluster: Profile-Loader / Profile-Routes
  • Failures addressed: ~12
  • Triage distribution: 1 CODE-DRIFT-REGRESSION (yaml v2 strict mode), 1 CODE-DRIFT-WEITER (channel plugins missing from production profile)

Changes

middleware/profiles/production.yaml + minimal-dev.yaml

yaml@^2.6.1 enforces strict YAML 1.2: @ is a reserved indicator character and must
be quoted when it starts a plain scalar. Both profile files used bare @omadia/... plugin
IDs, causing ProfileLoadError: Plain value cannot start with reserved character @ for
every test that loads a built-in profile. Fixed by quoting all @-prefixed plugin IDs.

Additionally, production.yaml was missing de.byte5.channel.teams and
de.byte5.channel.telegram. Both are referenced as constants in src/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.ts

Same quoting fix for inline YAML strings written to temp files in test fixtures.

Test plan

  • CI: profileLoader / built-in profiles all green
  • CI: profileLoader / object-form entries with config green
  • CI: profileLoader / invalid inputs → rejects duplicate plugin ids green
  • CI: profilesRouter all green

Drives ~12 of the ~100 remaining failures to zero. Other clusters tracked in #37.

cwendler added 7 commits May 17, 2026 12:22
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.
@Weegy

Weegy commented May 17, 2026

Copy link
Copy Markdown
Contributor

Superseded in part by #44 + needs reframing for the rest:

YAML quoting fix is already in main (commit 0bcb1fd) — covers profiles/{production,minimal-dev}.yaml + test/{profileLoader,profilesRouter}.test.ts.

Adding byte5-private channel plugins to the public-OSS production.yaml profile (de.byte5.channel.teams, de.byte5.channel.telegram) needs a separate decision — these plugin IDs are byte5-internal (live in the private omadia-byte5-plugins repo). OSS users applying the production profile would get plugin-not-found. If we want to include channel placeholders in the recommended profile, they should be generic IDs that ship as part of OSS, not byte5-specific.

Closing — please reopen as a focused PR for just the channel-plugin question if you want to pursue that.

@Weegy
Weegy deleted the fix/profile-loader-yaml-syntax branch May 17, 2026 15:10
Weegy added a commit that referenced this pull request May 17, 2026
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.
@Weegy

Weegy commented May 17, 2026

Copy link
Copy Markdown
Contributor

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 production.yaml + minimal-dev.yaml weren't covered. Re-audit caught it. Thanks for the original PR — the translation made it in.

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.

3 participants