Skip to content

spec: three spec-code discrepancies in core:config and core:config-loader #57

@lsmonki

Description

@lsmonki

Summary

The spec-compliance audit for config-cascade-variants found three discrepancies where the specs do not match the actual code. All three are spec drift — the code is correct and the specs need updating.

1. ConfigWriter.initProject signature (core:config)

Spec says: initProject(configPath: string, options: InitProjectOptions) — two parameters.

Code has: initProject(options: InitProjectOptions) — single parameter where configPath is options.projectRoot.

Fix: Update the spec to reflect the single-parameter signature with projectRoot inside InitProjectOptions.

2. ConfigWriter.listPluginstype required vs optional (core:config)

Spec says: listPlugins(configPath: string, type: string)type is required.

Code has: listPlugins(configPath: string, type?: string)type is optional.

Fix: Either make type optional in the spec, or make it required in the code. The optional version is more permissive and likely intentional.

3. Hook type mapping responsibility (core:config-loader)

Spec says: "The loader MUST map hooks.post: [{ run: 'make test' }] to { type: 'run', command: 'make test' }"

Code does: The config-loader preserves raw schemaOverrides data. Hook mapping (runtype: 'run', instructiontype: 'instruction') happens at schema resolution time, not during config loading.

Fix: Move this requirement out of core:config-loader and into the appropriate spec (likely core:schema-merge or core:composition).

Context

  • Source: spec-compliance audit 20260520-095622
  • Change: config-cascade-variants (archivable)
  • These are pre-existing discrepancies, not introduced by the cascade change

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions