os-sdlc: Project::Validation reports unknown keys in .sdlc/project.yaml #832

Closed
opened 2026-09-29 16:33:03 +00:00 by jared · 1 comment
Owner

Problem

Project::Validation does not report unknown keys in .sdlc/project.yaml.
The parser drops them silently, so a typo in a key changes behavior with no error.

Observed

parser/project/config/document.rb:5 sets FLAT_KEYS = %i[path test_path test_command test_framework lint_config].
Line 75 runs hash.slice(*FLAT_KEYS.map(&:to_s)), which drops every other key at the top level and under targets..
Proven 2026-09-29: a typo key (tset_pth: zzz, or tset_path under a target) loads with no error, no warning, and no validation problem.
Project::Config.load then Project::Validation#problems returns [].
A mistyped test_path falls back silently to the default test directory.
model/project/validation.rb:206-208 problems checks only: missing path on a named target, test_path, path, lint_config.

Reproduce

n/a: see Observed; add tset_pth: zzz to any .sdlc/project.yaml and call Project::Validation#problems.

Approach

Validation adds one problem per unknown key.
Each problem names the key, its location (top level or targets.), and the known keys.
implementation-open already raises ProjectValidationError on problems (command/implementation/open.rb:64-65), so it fails loudly.
The known-key list comes from the parser's own constants (one source), including top-level-only keys such as name, targets, tracker.

Required work:

  1. Validation reports each unknown key, top level and under targets., from the parser's constants — check: bin/os-sdlc-test

Acceptance criteria

  1. Given a .sdlc/project.yaml with a typo key, when implementation-open runs, then it fails with a message naming the key.
  2. Given every real .sdlc/project.yaml in /home/jared/dev (cc-os/.sdlc, cc-os/plugins/os-backlog/.sdlc, cc-os/plugins/os-sdlc/.sdlc, cc-plugins, llf-schema, ruby-gems/*), when validated, then each validates clean. Check them before closing.

Origin

  • Trigger: typo-key experiment on 2026-09-29
  • Improvised this session: none
  • Chain: silent typo ← parser slices to FLAT_KEYS ← DESIGN (parser/project/config/document.rb:5,75)
  • Root candidate: none
  • Where: parser/project/config/document.rb; model/project/validation.rb
  • Session: 61834fd0-8fa2-40d2-8215-fb2f0622220d
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-pass-os-sdlc/61834fd0-8fa2-40d2-8215-fb2f0622220d.jsonl
## Problem Project::Validation does not report unknown keys in .sdlc/project.yaml. The parser drops them silently, so a typo in a key changes behavior with no error. ## Observed parser/project/config/document.rb:5 sets `FLAT_KEYS = %i[path test_path test_command test_framework lint_config]`. Line 75 runs `hash.slice(*FLAT_KEYS.map(&:to_s))`, which drops every other key at the top level and under targets.<name>. Proven 2026-09-29: a typo key (`tset_pth: zzz`, or `tset_path` under a target) loads with no error, no warning, and no validation problem. `Project::Config.load` then `Project::Validation#problems` returns `[]`. A mistyped test_path falls back silently to the default test directory. model/project/validation.rb:206-208 `problems` checks only: missing path on a named target, test_path, path, lint_config. ## Reproduce n/a: see Observed; add `tset_pth: zzz` to any .sdlc/project.yaml and call `Project::Validation#problems`. ## Approach Validation adds one problem per unknown key. Each problem names the key, its location (top level or targets.<name>), and the known keys. implementation-open already raises ProjectValidationError on problems (command/implementation/open.rb:64-65), so it fails loudly. The known-key list comes from the parser's own constants (one source), including top-level-only keys such as name, targets, tracker. Required work: 1. Validation reports each unknown key, top level and under targets.<name>, from the parser's constants — check: `bin/os-sdlc-test` ## Acceptance criteria 1. Given a .sdlc/project.yaml with a typo key, when implementation-open runs, then it fails with a message naming the key. 2. Given every real .sdlc/project.yaml in /home/jared/dev (cc-os/.sdlc, cc-os/plugins/os-backlog/.sdlc, cc-os/plugins/os-sdlc/.sdlc, cc-plugins, llf-schema, ruby-gems/*), when validated, then each validates clean. Check them before closing. ## Origin - Trigger: typo-key experiment on 2026-09-29 - Improvised this session: none - Chain: silent typo ← parser slices to FLAT_KEYS ← DESIGN (parser/project/config/document.rb:5,75) - Root candidate: none - Where: parser/project/config/document.rb; model/project/validation.rb - Session: 61834fd0-8fa2-40d2-8215-fb2f0622220d - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-pass-os-sdlc/61834fd0-8fa2-40d2-8215-fb2f0622220d.jsonl
Author
Owner

Resolution

Done: Project::Validation reports each unknown key in .sdlc/project.yaml (top level and targets.) with its location and the known keys, from Document::TARGET_KEYS/TOP_LEVEL_KEYS; implementation-open fails loudly on a typo. Stale code_path keys renamed to path in plugins/os-backlog, llf-schema and cc-plugins (user chose option A).

Evidence: Commit b875b231 on main (588e81c9); llf-schema 3cddbb7 and cc-plugins e5fd907 (local, not pushed); all 17 real configs validate clean; suite 1331 runs 0 failures.

Follow-ups: none

## Resolution **Done:** Project::Validation reports each unknown key in .sdlc/project.yaml (top level and targets.<name>) with its location and the known keys, from Document::TARGET_KEYS/TOP_LEVEL_KEYS; implementation-open fails loudly on a typo. Stale code_path keys renamed to path in plugins/os-backlog, llf-schema and cc-plugins (user chose option A). **Evidence:** Commit b875b231 on main (588e81c9); llf-schema 3cddbb7 and cc-plugins e5fd907 (local, not pushed); all 17 real configs validate clean; suite 1331 runs 0 failures. **Follow-ups:** none
jared closed this issue 2026-09-29 16:49:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#832
No description provided.