Release 3.3.5: discover nested per-change baseline artifacts#20
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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>.txtlayout 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:
.ralph/baselines/<gate>.txt.ralph/baselines/<change>-<gate>.txt.ralph/baselines/<change>/<gate>.txt(new)Implementation:
_detectRecordedBaselineGatesnow also walks one level of subdirectories under.ralph/baselines/, preserving the existing gate-name regex, EXIT footer parse, and sort priority. The returnedfilefield uses the relative path inside.ralph/, so nested matches surface asbaselines/<change>/<gate>.txtin agent feedback.Verification:
No behavioral change for the flat layouts; pure compatibility extension.