Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ function nextSessionDepartureRow(row, current){
"</span>" : "") +
`<p class="next-session-departure-reading">${esc(text("reading"))}</p>` +
`<p class="next-session-departure-base">${esc(baseline + window)}` +
(text("cutoff_text") ? ` · ${esc(text("cutoff_text"))}` : "") +
(text("evidence") ? ` · ${esc(text("evidence"))}` : "") + "</p>" +
/* Its own element after the base line and never a clause appended to it.
The base line is mono in the dimmest ink, the register for a string a
Expand Down
2 changes: 1 addition & 1 deletion cargento/skills/cargento/tests/test_focus.py
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ def test_the_pinned_assembly_is_untouched(self) -> None:
# would fail on the reader rather than on an injected token.
self.assertNotIn(b'<meta name="cargento-focus"', assembled)
self.assertEqual(
"713f70f69eb48f85fa11f21e77f076879001b304c6d5d201660a67e25c8bd2a2",
"566decf4aed14c56703dc55679e3bcaf53c5a539608d297568508f2f7ad3532a",
hashlib.sha256(assembled).hexdigest(),
)

Expand Down
18 changes: 18 additions & 0 deletions cargento/skills/cargento/tests/test_next_cockpit.py
Original file line number Diff line number Diff line change
Expand Up @@ -7278,6 +7278,24 @@ def test_a_raised_departure_is_reachable_from_the_section_that_names_them(self)
# The sentence the section used to print over two standing departures.
self.assertNotIn("No reading has been made, so nothing has been raised.", out["html"])

def test_a_raised_departure_renders_cutoff_text_when_present(self) -> None:
"""DRC-4562. The producer's account of how far evidence went is rendered
beside the evidence line on departure rows."""
departure_with_cutoff = (
'{constraint:"TYPED GOAL", clause:"keep tests green",'
' reading:"Test failed.",'
' evidence:"tests/test_foo.py", revision:1, cutoff:100, at:101,'
' cutoff_text:"Read 14 entries, 9 of them the session\'s own account",'
' follow_up:""}'
)
out = self.review(
"__dashboard.unasked = true;\n"
f"__dashboard.sessions[0].departures = [{departure_with_cutoff}];\n"
'__dashboard.sessions[0].departure_why = "";\n'
)
self.assertIn("Read 14 entries", out["visible"])
self.assertIn("9 of them the session", out["visible"])

def test_a_raise_whose_baseline_did_not_survive_says_so_here_too(self) -> None:
out = self.review(
"__dashboard.unasked = true;\n"
Expand Down
4 changes: 2 additions & 2 deletions cargento/skills/cargento/tests/test_next_flag.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ def test_retired_next_query_is_not_a_page_alias(self) -> None:
def test_the_canonical_loader_is_the_released_ui_bundle(self) -> None:
page = frontend_page.load_page()

self.assertEqual(910_419, len(page))
self.assertEqual(910_488, len(page))
self.assertEqual(
"713f70f69eb48f85fa11f21e77f076879001b304c6d5d201660a67e25c8bd2a2",
"566decf4aed14c56703dc55679e3bcaf53c5a539608d297568508f2f7ad3532a",
hashlib.sha256(page).hexdigest(),
)

Expand Down
8 changes: 4 additions & 4 deletions cargento/skills/cargento/tests/test_next_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,8 @@ def test_load_page_preserves_its_byte_oracles(self) -> None:
"62f971c5e2a570068b7e2c3ee72b2499774d14a3b739f6f908962f91b98382f1",
),
"next-session.js": (
36_155,
"966acf75800c20a6588ccad60238152b6a8da08d17ef92af0fd7d4ba9ec1f30e",
36_224,
"f4186df329e0c6b00889071b4f25e6b96604eefa639220ba7470c19257cd2a8c",
),
"next-workstream.js": (
18_659,
Expand Down Expand Up @@ -707,9 +707,9 @@ def test_load_page_preserves_its_byte_oracles(self) -> None:
)

assembled = frontend_page.load_page()
self.assertEqual(910_419, len(assembled))
self.assertEqual(910_488, len(assembled))
self.assertEqual(
"713f70f69eb48f85fa11f21e77f076879001b304c6d5d201660a67e25c8bd2a2",
"566decf4aed14c56703dc55679e3bcaf53c5a539608d297568508f2f7ad3532a",
hashlib.sha256(assembled).hexdigest(),
)

Expand Down