Skip to content

feat: surface 5 config keys read by code but absent from config.yaml - #1449

Merged
avoidwork merged 4 commits into
mainfrom
feat/surface-config-keys
Oct 20, 2026
Merged

avoidwork merged 4 commits into
mainfrom
feat/surface-config-keys

Conversation

@avoidwork

@avoidwork avoidwork commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Description

Surfaces five config keys that are read by live code but absent from config.yaml, making them discoverable and configurable. Adds calendar.active, providers.fal (commented-out), memory.maxEntries, tui.statusBar.project, and schedules.logPath to config.yaml with their current effective defaults. Adds maxEntries to MemorySchema so MEMORY_MAX_ENTRIES resolves through buildReverseMap(), and adds tests asserting env-var overrides reach each surfaced key via syncEnv().

Type of Change

  • New feature (non-breaking change which adds functionality)

Testing

Added tests in tests/unit/config_loader.test.js asserting:

  • buildReverseMap(ConfigSchema) contains MEMORY_MAX_ENTRIES → memory.maxEntries, ACTIVE → calendar.active, TUI_STATUS_BAR_PROJECT → tui.statusBar.project, SCHEDULES_LOG_PATH → schedules.logPath
  • syncEnv() materializes each of these paths from their env vars

Existing tests/unit/tools/calendar/providers/factory.test.js already asserts calendar.active: msgraph selects MsGraphProvider. Full suite: 4240 tests passing.

Coverage

  • Line coverage maintained

Checklist

  • npm run lint passes
  • Tests pass with maintained line coverage
  • No forbidden patterns used
  • Conventional Commit style applied

Closes #1445

Adds OpenSpec change surface-config-keys documenting the five config keys
(calendar.active, providers.fal, memory.maxEntries, tui.statusBar.project,
schedules.logPath) that are read by code but absent from config.yaml.

Closes #1445
@avoidwork avoidwork self-assigned this Oct 20, 2026
Adds calendar.active, providers.fal (commented-out), memory.maxEntries,
tui.statusBar.project, and schedules.logPath to config.yaml with their
current effective defaults. Adds maxEntries to MemorySchema so
MEMORY_MAX_ENTRIES resolves through buildReverseMap(). Adds tests
asserting env-var overrides reach each surfaced key via syncEnv().

Closes #1445
Archives the OpenSpec change and syncs the delta specs
(config-keys-surface, config-system, env-config-materialization)
into openspec/specs/.
@avoidwork

Copy link
Copy Markdown
Owner Author

Implementation Audit Results — surface-config-keys

Goal Fulfillment

All five goals from issue #1445 are satisfied:

  1. calendar.active — Added active: google to config.yaml under calendar:. Fallback || "google" at src/tools/calendar/providers/factory.js:18 still applies when omitted. Schema field already present (CalendarConfigSchema.active).
  2. providers.fal — Added a commented-out fal block under providers: documenting the optional backend (type, model, credentials.apiKey) that gates generateImage at src/tools/index.js:329,411. Not added as an empty stub.
  3. memory.maxEntries — Added maxEntries: 100 to config.yaml and maxEntries: z.number().int().positive().default(100) to MemorySchema. Fallback config.memory.maxEntries || 100 at src/tools/memory/index.js:300 still applies when omitted.
  4. tui.statusBar.project — Added project: true to config.yaml under tui.statusBar:. Fallback statusBar.project !== false at src/tui/statusBar.js:128 still applies when omitted. Schema field already present.
  5. schedules.logPath — Added logPath: "" to config.yaml under schedules:. Fallback if (config.schedules.logPath) at index.js:68 still applies when omitted. Schema field already present.

Acceptance Criteria Verification

  • All five keys present in config.yaml with current effective defaults — Verified via loadConfig(): calendar.active=google, memory.maxEntries=100, tui.statusBar.project=true, schedules.logPath="", providers.fal=undefined (commented-out, correct).
  • Each has a matching Zod schema field, and an env override demonstrably reaches it — Verified via buildReverseMap(ConfigSchema) and syncEnv():
    • MEMORY_MAX_ENTRIES → memory.maxEntries
    • ACTIVE → calendar.active
    • TUI_STATUS_BAR_PROJECT → tui.statusBar.project
    • SCHEDULES_LOG_PATH → schedules.logPath
  • calendar.active: msgraph observably selects MsGraphProvider — Covered by existing test tests/unit/tools/calendar/providers/factory.test.js ("should return MsGraphProvider when active is msgraph").
  • Omitting a key produces behavior identical to today — Fallbacks preserved; verified getActiveCalendarProvider({ calendar: { google: {} } }) returns Google provider.
  • sandbox.urlAllowlist and search.parallel are NOT added — Confirmed not present in config.yaml or schemas.
  • npm run test, npm run lint, npm run coverage pass — 4240 tests pass, lint clean, coverage maintained (91.54% line).

Spec Compliance

  • Spec delta config-keys-surface (new capability) documents the five surfaced keys.
  • Spec deltas config-system and env-config-materialization document the schema fields and env-var resolution.
  • All tasks in tasks.md marked [x].

Quality Check

  • No dead code introduced. providers.fal added as a documented comment, not an empty stub.
  • No forbidden patterns (no console.log, no silent catches).
  • Changes minimal and scoped to the five keys.

The fal provider is a real configurable backend, not a commented-out
placeholder. Uncomment it with the documented shape (type, model,
credentials.apiKey) so it is a discoverable, active config key. The
generateImage tool still gates on a non-empty falApiKey at runtime.
@avoidwork
avoidwork merged commit 3511173 into main Oct 20, 2026
2 checks passed
@avoidwork
avoidwork deleted the feat/surface-config-keys branch October 20, 2026 22:18
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.

feat: surface 5 config keys read by code but absent from config.yaml

1 participant