Skip to content

Generate training data: keep a correspondence block printed after the references in the header - #792

Merged
de-code merged 2 commits into
mainfrom
fix-late-correspondence
Nov 4, 2026
Merged

de-code merged 2 commits into
mainfrom
fix-late-correspondence

Conversation

@de-code

@de-code de-code commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

part of https://github.com/eLifePathways/ScienceBeam2.0/issues/205

A preprint server prints who to write to at the end of the article, and the rule that keeps such a block in the header region names the field it arrives under. Giving a correspondence block a field of its own took it out of that rule, and out of the one that searches front matter from the start of the document, so a block printed late left the region it belongs to and fell into the body.

It is back where it was, and generates what it generated before. The rule that was written for this case now names the field the block actually carries, as does the one the aligner uses to find front matter wherever it is printed.

The test guarding that rule kept passing throughout, because it asserts on the field the block used to arrive under. It has a sibling now that asserts the behaviour for the field the block has, which is what makes the rule hard to walk past again.

Alongside it, nothing in the tests or the documentation names a real document any more. A comment explaining why a test exists named the document it came from, a fixture used one as its value, and the training documentation worked through one by name. Each describes the shape it is about instead, or uses a plainly invented id, because what a document is called belongs to the corpus rather than to the code that reads it.

… references in the header

A preprint server sets who to write to at the end of the article, and the rule that keeps such a block in the header region names the field it arrives under. Giving a correspondence block a field of its own took it out of that rule, and out of the one that searches front matter from the start of the document, so two documents lost the region their block belongs to.

The test for the rule named both of those documents and kept passing, because it asserts on the field the block no longer carries. It now has a sibling that names the field it does.
A comment explaining why a test exists named the document it came from, a fixture used one as its value, and the training documentation worked through one by name. Each now describes the shape it is about, or uses a plainly invented id. What a document is called belongs to the corpus, not to the code that reads it.
@de-code de-code self-assigned this Nov 4, 2026
@de-code
de-code merged commit fe99718 into main Nov 4, 2026
6 checks passed
@de-code
de-code deleted the fix-late-correspondence branch November 4, 2026 09:34
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