Skip to content

tests: assert that a failed report leaves one whole JSON document on stdout - #397

Merged
luisleo526 merged 2 commits into
mainfrom
lvd/en132-m046-v3
Oct 15, 2026
Merged

luisleo526 merged 2 commits into
mainfrom
lvd/en132-m046-v3

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

The post-execution test for run_json.py now checks that stdout is exactly one whole JSON document, and its messages state only what was established (empty stdout, more than one line, not a JSON object, or a report prefix before the failure document), with the prefix check and the write-count check kept separate.

With a deliberate bug that streams half a report to stdout, the test fails by assertion; restored it passes.

Tests only (tests/test_run_json_post_execution.py); no src/ or docker/ change. All CI steps passed on this exact tree.

🤖 Generated with Claude Code

luisleo526 and others added 2 commits October 15, 2026 10:55
…stdout

When the encoder fails after some report chunks, run_json must write only
the failure document to stdout and never a half report. The test noticed a
regression only because the JSON decoder raised inside a helper.

assert_failure now requires the whole owned stdout to be one line holding
one JSON object, and turns a decode error into an AssertionError that names
the half-written report and quotes the first 80 characters and the length.
test_encoder_failure_after_report_chunks asserts, from the prefix the fault
recorded, that no report chunk reached stdout and that stdout was written
exactly once. No expected text or offset is hard-coded.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@luisleo526
luisleo526 merged commit ea209c1 into main Oct 15, 2026
20 checks passed
luisleo526 pushed a commit that referenced this pull request Oct 17, 2026
…value-ownership wording)

The paired-HPO line no longer claims HPO support for selected-window
revision 1.3; HPO 1.6.0 does not implement selected windows
(docs/return-stats.md:9 in pineforge-hpo). The landed follow-ups #396/#397
are said to be checked against their own deliberate bugs, and the figures
remain the candidate's. README.md and docker/README.md replace
"complete value ownership with" by "value ownership through", the wording
of the 1.6.0-rc.1 changelog entry, since no completeness proof was run.
The changelog's no-code-change sentence names the docker/README.md rewording.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
luisleo526 added a commit that referenced this pull request Oct 17, 2026
* docs: the 1.6.0 release (changelog, current pair, HPO note)

Prepare the final 1.6.0 release documentation dated 2026-10-17, paired with pineforge-codegen 1.6.0 and the matching pineforge-hpo release for selected-window contract revision 1.3.

CHANGELOG.md adds the 1.6.0 — 2026-10-17 entry above 1.6.0-rc.1 — 2026-10-14, carrying forward the release-candidate entry's substance and naming the six documentation and test-only changes merged since v1.6.0-rc.1 (#390, #393, #394, #395, #396, #397).

README.md updates the current-release block and the codegen command-block pointer to 1.6.0 and adds the v1.6.0 bullet to the Releases section. The current-release block's 1.5.0 sentence from 4c78f39 ("The release notes cover recorded outputs, the call-scoped report rule and the test inputs' move to a private repository") is replaced on purpose by the 1.6.0 sentence that lists what 1.6.0 covers; that 1.5.0 summary stays in the Releases list (the v1.5.0 bullet) and in CHANGELOG.md's 1.5.0 entry.

docs/pages/public-contract.md adds the 1.6.0 paragraph after the 1.5.0 paragraph and updates the same-version pairing line to 1.6.0.

* docs: 1.6.0 notes review fixes (HPO pairing line, follow-up figures, value-ownership wording)

The paired-HPO line no longer claims HPO support for selected-window
revision 1.3; HPO 1.6.0 does not implement selected windows
(docs/return-stats.md:9 in pineforge-hpo). The landed follow-ups #396/#397
are said to be checked against their own deliberate bugs, and the figures
remain the candidate's. README.md and docker/README.md replace
"complete value ownership with" by "value ownership through", the wording
of the 1.6.0-rc.1 changelog entry, since no completeness proof was run.
The changelog's no-code-change sentence names the docker/README.md rewording.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: HaoLiangWen <[email protected]>
Co-authored-by: CORE-TOP <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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