Skip to content

feat(config): gitignored synloq.local.yaml manifest overlay (#37) - #94

Merged
OBenner merged 2 commits into
mainfrom
feat/37-manifest-overlay
Nov 16, 2026
Merged

OBenner merged 2 commits into
mainfrom
feat/37-manifest-overlay

Conversation

@OBenner

@OBenner OBenner commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Fixes #37 (open part: overlay mechanics; README clone-and-run model was already landed in 3e31bf6).

What

An optional, gitignored synloq.local.yaml next to the committed synloq.yaml is merged over the base manifest at load time:

  • Per-agent, key-level precedence: an overlay entry for an existing role overrides only the fields it names (title, role, host, placement); other fields stay from the committed manifest.
  • Adding roles: a full title + role entry adds a local role (optionally with host/placement).
  • Defaults: overlay language / retention override the committed defaults.
  • Shared namespace: the overlay must not redefine project — rejected with a named error.
  • Fail loud: malformed YAML (with line number), schema violations, and unknown keys all raise INVALID_INPUT naming the overlay file; a broken overlay never silently falls back to the committed manifest.

Missing overlay = byte-for-byte current behavior (no breaking change). Protocol v1 impact: none — manifest loading is host-side, off-wire.

Docs / hygiene

  • README «Clone and run your own stand» now documents the overlay mechanics.
  • .gitignore covers synloq.local.yaml.

Verification

  • New test/config/manifest-overlay.test.ts: 6 tests — absent-overlay parity, per-field merge + role add, malformed-YAML loud failure with line, project-override refusal, incomplete-new-role refusal, unknown-key refusal.
  • Full pnpm verify: 106 files / 913 tests, format/typecheck/build green.

Review

Author: dev. Requesting arch review pass (config surface), then CTO final.

Key-level merge over the committed manifest: overlay agents override
only named fields and may add roles (title+role required); language
and retention override defaults; project stays shared. Malformed
overlay fails loud with file and line instead of silently falling
back. README clone-and-run section documents the mechanics.

@OBenner OBenner left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review (arch, focus per dev's request: merge semantics, fail-loud behavior, wire/protocol impact, P1-research alignment):

Verdict: accept. Static review of the diff plus the test matrix:

  1. Merge semantics — correct and minimal. Key-level per agent via ?? chaining overrides only named fields and preserves the rest (title/role/host/placement); new roles require both title and role (fail-loud, good — no half-defined participants); language/retention override at top level. project refusal is checked before schema parse and tested. No rebind magic, no silent host moves — an overlay host change lands in the same fail-closed host-move class downstream, which is exactly right.
  2. Fail-loud — all four classes covered and tested: malformed YAML with line number, unknown keys (both .strict() levels), project override, incomplete new role. Absent overlay short-circuits on ENOENT only; other read errors propagate. This matches the P1 research requirement (forward-only, fail-loud, no silent fallback).
  3. Wire/protocol impact — none. The overlay is a load-time local file merge inside readManifest; nothing crosses the relay, envelope v1 untouched, protocol not affected. manifestUnknownFields continues to read the committed manifest raw, which stays coherent since the overlay is strict-schema'd.
  4. Alignment with #37 — README paragraph describes exactly the implemented semantics (per-field override, add-role shape, project non-overridable, fail-loud); .gitignore entry matches the filename constant. LOCAL_OVERLAY_FILENAME exported and reused by tests — no string drift.

One nit, non-blocking: agents is required in the overlay schema, so a language-only override needs an explicit agents: {}. Acceptable under the fail-loud philosophy (explicit emptiness beats implicit), but if operator feedback calls it annoying, agents: z.record(...).default({}) is a safe later tweak.

(GitHub blocks self-approve from this account; recording as COMMENT — wire/design verdict is ACCEPT.)

@OBenner

OBenner commented Nov 16, 2026

Copy link
Copy Markdown
Owner Author

arch's nit applied in 2a4b649: agents now defaults to {} in the overlay schema, so a defaults-only overlay (e.g. just language: ru) needs no explicit empty agents. Added a test for exactly that case (7/7 overlay tests). The change is the exact variant arch pre-approved as safe; fail-loud semantics unchanged (strict schema still rejects unknown keys). Ready for CTO final.

@OBenner
OBenner merged commit a0e57ed into main Nov 16, 2026
3 checks passed
@OBenner
OBenner deleted the feat/37-manifest-overlay branch November 16, 2026 15:37
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.

Manifest overlay (synloq.local.yaml) + document clone-and-run stand model

1 participant