Skip to content

Read a scenario's view past stderr; match a pin URL only as a whole name - #23

Merged
dmccoystephenson merged 1 commit into
mainfrom
feature/view-stderr-and-pin-url-boundary
Nov 6, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
feature/view-stderr-and-pin-url-boundary

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

  • Save-compatibility gate (Save-compat: stderr after a scenario's JSON line fails the read as a verdict on the candidate #18): view() took the last output line as the view, and common.run() places stderr after stdout, so a library warning failed a correct read as a verdict on the candidate. The view is now read by a new pure helper, parse_view(), as the last line holding a JSON object. Output with no such line still fails, and a non-zero exit is still returned unchanged. A view that is not an object (previously accepted by view()) is now rejected; every scenario in scenarios/ prints an object.
  • Consumers gate (Consumers gate: a repository URL matches any longer repository name as a pin #20): url in spec was a substring test, so a repository URL matched every longer repository name, and a consumer that does not pin the library was tested instead of skipped. _names_url() now requires the URL to end at the end of the spec, or at @ # / ? ; or whitespace, with or without .git. The issue's list was widened with ?, ; and whitespace so that a marker after a bare URL is still recognised.
  • Docs: the save_compat.py docstring, the README scenario row, the consumers paragraph and the "not in a tag yet" row were updated.

No assertion name changes. gates/common.py and the workflows are untouched.

Closes #18
Closes #20

Verification status: gate run UNVERIFIED

A real gate run was not obtained, so this PR is not to be merged automatically. The dispatch's permission allow-list required approval for python3.12, for env-prefixed gate commands and for gh workflow run, and no approver was present. python on this host is 2.7 and python3 is 3.8. These blocks were not worked around.

The following evidence was obtained:

  • python3 -m unittest tests/test_save_compat_view.py tests/test_consumers_find_pin.py tests/test_save_compat_migrations.py tests/test_result.py on 3.8: 43 tests, OK, 4 skipped (tomllib needs 3.11+). tests/test_tests_gate_probe.py cannot be imported on 3.8, with or without this change.
  • Revert-and-run, gates/consumers_gate.py at origin/main: test_a_url_that_only_starts_with_the_repository_is_not_a_pin failed on all 4 lines; restored, it passed.
  • Revert-and-run, gates/save_compat.py at origin/main: test_a_clean_read_with_a_warning_after_it_passes failed with (1, None, ...) != (0, {'saves': []}, ...), and test_a_scenario_that_printed_no_object_fails failed; restored, both passed.
  • Check workflow (3.12, full unit suite) on the PR head.
  • Real gates/save_compat.py run, PASS/FAIL lines to be quoted. No PASS or FAIL line from a real gate run exists yet.
  • Real gates/consumers_gate.py run, PASS/FAIL lines to be quoted.

Suggested runs on this branch, on 3.12:

REPOSITORY=Stephenson-Software/tak SHA=640ef68e3c990e3c146731c4c4be5694d81f44de BASELINE_REF=v0.2.0 \
  SCENARIO=scenarios/tak_slots.py DISTRIBUTION=tak WORK=/tmp/prg-work python3.12 gates/save_compat.py
REPOSITORY=Stephenson-Software/tak SHA=640ef68e3c990e3c146731c4c4be5694d81f44de \
  CONSUMERS=Stephenson-Software/Tidewater WORK=/tmp/prg-consumers python3.12 gates/consumers_gate.py

Known limit

A stderr line that is itself a JSON object, such as a structured log record, is still read as the view, because run() joins both streams. Separating them means changing gates/common.py, which is outside this PR.

Issues not taken this cycle

This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

🤖 Generated with Claude Code

save-compat: view() took the last output line as the view, and run()
puts stderr after stdout, so a library warning failed a correct read as
a verdict on the candidate. Read the last line that is a JSON object.
Output with no such line still fails.

consumers: `url in spec` matched any longer repository name, so a
consumer pinning another project was tested instead of skipped. The URL
now has to end at the end of the spec, or at @ # / ? ; or whitespace,
with or without .git.

Closes #18
Closes #20

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dmccoystephenson

Copy link
Copy Markdown
Member Author

Self-review rubric, scored against commit c756a52. Result: not ready for merge. Gate-run evidence is missing.

Judgment calls for a reviewer:

Phase 8: the merge was withheld. The dispatch's merge pre-authorization conveys permission, not validation. The two runs listed in the PR body, on 3.12, are the remaining step.

This comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

@dmccoystephenson
dmccoystephenson merged commit 6690769 into main Nov 6, 2026
1 check passed
dmccoystephenson added a commit that referenced this pull request Nov 7, 2026
…lds (#25)

A documentation sweep against the gates, workflows and tags. Adds the
consumers gate's assertion list (the other two gates had one), the keys
each gate adds to result.json, what a manifest's expected and primaryFile
do, and the view-must-be-an-object change from #23 to the untagged row.
States that an all-skipped consumers run passes, as it does today (#21).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant