Merge pull request 'Ground the judge's quote with markdown emphasis and whitespace ignored' (#176) from grounded-emphasis into rebuild
This commit was merged in pull request #176.
This commit is contained in:
@@ -94,4 +94,10 @@ def verdict_from(output) -> Verdict | Failure:
|
||||
|
||||
|
||||
def grounded(verdict, transcript) -> bool:
|
||||
return verdict.evidence.strip() != "" and verdict.evidence in transcript
|
||||
evidence = plain(verdict.evidence)
|
||||
return evidence != "" and evidence in plain(transcript)
|
||||
|
||||
|
||||
def plain(text) -> str:
|
||||
# The judge drops markdown emphasis and reflows whitespace when it quotes.
|
||||
return " ".join(text.replace("*", "").replace("_", "").split())
|
||||
|
||||
@@ -104,6 +104,10 @@ class Grounded(unittest.TestCase):
|
||||
self.assertFalse(judge.grounded(verdict("invented"), "the transcript"))
|
||||
self.assertFalse(judge.grounded(verdict(""), "the transcript"))
|
||||
self.assertFalse(judge.grounded(verdict(" "), "the transcript"))
|
||||
transcript = "done.\n\n**Your step:**\n```\n./run.sh\n```\nRun it."
|
||||
self.assertTrue(judge.grounded(verdict("Your step:\n```\n./run.sh\n```\nRun it."), transcript))
|
||||
self.assertTrue(judge.grounded(verdict("Your step: ``` ./run.sh ``` Run it."), transcript))
|
||||
self.assertFalse(judge.grounded(verdict("**"), transcript))
|
||||
|
||||
|
||||
class Verdict(unittest.TestCase):
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
The sketches, the judges' verdicts and what to take from each: `~/code/claude-handoffs/claude-config_2026-09-28.md`.
|
||||
|
||||
- **Match the judge's quote in `grounded()` with markdown emphasis and whitespace ignored, as main's #155 does.** The judge drops a bold line's closing `**` when it quotes the line. `rebuild` rejects such a quote, so merging `rebuild` into main would bring back loops that stop on a correct verdict.
|
||||
- **Bring `rebuild` to the comprehension floor on the four-seat panel, and open its PR into main for the human.** Every dimension and the overall must reach 7.0, and none may fall below the last run. A dimension under the floor gets its places filed above this item. ⚠️ Leave the PR ready and unmerged: only the human merges it, after approving the whole rebuild. The PR deletes main's `AGENTS.md` paragraph on a rebuild chunk's larv-review, which only main holds.
|
||||
|
||||
## 0.2.0
|
||||
|
||||
Reference in New Issue
Block a user