Skip to content

Release 3.3.5: discover nested per-change baseline artifacts#20

Merged
ncheaz merged 1 commit into
mainfrom
release/3.3.5
May 11, 2026
Merged

Release 3.3.5: discover nested per-change baseline artifacts#20
ncheaz merged 1 commit into
mainfrom
release/3.3.5

Conversation

@ncheaz

@ncheaz ncheaz commented May 11, 2026

Copy link
Copy Markdown
Owner

The baseline-gate detector at runner-baseline-gate.js only scanned the top level of .ralph/baselines/, which made the nested .ralph/baselines/<change>/<gate>.txt layout invisible. Changes that grouped their per-change baselines under a slug subdirectory (a pattern the BP doc's template implied but did not state explicitly) hit a spurious "no matching baseline artifact found under .ralph/baselines" gate and emitted BLOCKED_HANDOFF before any implementation could start.

This release expands the discovery to all three documented layouts:

  • flat unprefixed: .ralph/baselines/<gate>.txt
  • flat prefixed: .ralph/baselines/<change>-<gate>.txt
  • nested: .ralph/baselines/<change>/<gate>.txt (new)

Implementation:

  • lib/mini-ralph/runner-baseline-gate.js: _detectRecordedBaselineGates now also walks one level of subdirectories under .ralph/baselines/, preserving the existing gate-name regex, EXIT footer parse, and sort priority. The returned file field uses the relative path inside .ralph/, so nested matches surface as baselines/<change>/<gate>.txt in agent feedback.
  • tests/unit/javascript/mini-ralph-runner.test.js: three new tests cover nested-only discovery, mixed flat+nested coexistence, and a feedback-level regression where a completed pre-flight task plus a nested baseline produce "baseline classification" guidance instead of "missing baseline" handoff.
  • OPENSPEC-RALPH-BP.md: documents all three supported layouts and updates the pre-flight task template so future changes can adopt the nested layout without tripping the gate.

Verification:

  • jest: 730/730 passing (3 new tests in the baseline-gate describe block; everything else unchanged)
  • no lint findings in either touched JS file

No behavioral change for the flat layouts; pure compatibility extension.

The baseline-gate detector at runner-baseline-gate.js only scanned the
top level of `.ralph/baselines/`, which made the nested
`.ralph/baselines/<change>/<gate>.txt` layout invisible. Changes that
grouped their per-change baselines under a slug subdirectory (a pattern
the BP doc's template implied but did not state explicitly) hit a
spurious "no matching baseline artifact found under .ralph/baselines"
gate and emitted BLOCKED_HANDOFF before any implementation could start.

This release expands the discovery to all three documented layouts:

  * flat unprefixed: `.ralph/baselines/<gate>.txt`
  * flat prefixed:   `.ralph/baselines/<change>-<gate>.txt`
  * nested:          `.ralph/baselines/<change>/<gate>.txt`  (new)

Implementation:
  * lib/mini-ralph/runner-baseline-gate.js: `_detectRecordedBaselineGates`
    now also walks one level of subdirectories under `.ralph/baselines/`,
    preserving the existing gate-name regex, EXIT footer parse, and
    sort priority. The returned `file` field uses the relative path
    inside `.ralph/`, so nested matches surface as
    `baselines/<change>/<gate>.txt` in agent feedback.
  * tests/unit/javascript/mini-ralph-runner.test.js: three new tests
    cover nested-only discovery, mixed flat+nested coexistence, and a
    feedback-level regression where a completed pre-flight task plus a
    nested baseline produce "baseline classification" guidance instead
    of "missing baseline" handoff.
  * OPENSPEC-RALPH-BP.md: documents all three supported layouts and
    updates the pre-flight task template so future changes can adopt
    the nested layout without tripping the gate.

Verification:
  * jest: 730/730 passing (3 new tests in the baseline-gate describe
    block; everything else unchanged)
  * no lint findings in either touched JS file

No behavioral change for the flat layouts; pure compatibility extension.
@ncheaz ncheaz merged commit 50737de into main May 11, 2026
0 of 2 checks passed
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.

1 participant