Skip to content

Spec 002 T027: a book's and a web page's references in today's form - #218

Merged
adamjohnwright merged 3 commits into
mainfrom
decisions/report-references
Nov 14, 2026
Merged

adamjohnwright merged 3 commits into
mainfrom
decisions/report-references

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec 002 (analysis report), T027: the second of the two points T019 left open (research R9), decided on 14 Nov 2026: the analysis report prints a book's and a web page's references the way today's report does.

Today's form, read from its source. I read ApaStyle in reactome/analysis-report's 1.4.0-SNAPSHOT build from its compiled classes. Nothing here shows that this build is the one deployed. What it writes:

  • a web page: Title. Retrieved from address, with no authors and no year;
  • a book: Authors (year)., then Chapter, Book in italics, then , pages; it prints no publisher and no ISBN;
  • an article: the same as spec 001's form, apart from how authors are written, which the comparison does not read.

A correction to R9: T019 noted "a book's publisher after a comma". The text after the comma is actually the book's title, which follows the chapter title. Today's report prints no publisher. Spec 001's form does print the publisher. On R-HSA-1280215 in release 98 (checked against a private copy of the graph), the report now prints (2002). Cytokines and the immune system, Cytokine Reference. and <title>. Retrieved from <address> for that pathway's two web pages.

Changes

  • The report and spec 001 share reference() through sectionHtml. So the report gets its own form, reportReference (src/report/layout.ts), which it passes to sectionHtml. Spec 001's book is unchanged; referenceLead and referenceTitle are split out of reference() without changing what it writes. Follow-up, not done: whether spec 001's book should switch to this form is still open.
  • The address and the publisher are read by spec 001's literature query as it stands; no field is added.
  • The compare-report reader now drops pdf-export's list number (3. ) from a reference that has no year. In today's form a web page has no year, so the number used to make every web page differ.
  • Spec Assumptions ("One implementation"), research R9 (its row, plus a note on today's form), and tasks.md T027 updated.

Tests (each seen failing without its change)

  • test/report/body.test.ts: the fixture graph's book (which has a publisher) and its web page, read by literature, print in the report's form. Spec 001's form of the same two is asserted unchanged.
  • test/compare/report.test.ts: a book and a web page printed in today's form and in the report's form agree in compare-report. The today's-form helper now writes both kinds as ApaStyle does. This test also fails without the reader's list-number fix.

All 715 tests pass locally against a freshly loaded fixture graph; types, lint and format pass as well. Locally the licence check failed because of a symlinked node_modules in my worktree; the same lock file passes it (0 offending).

This PR and #217 both add a task to tasks.md just before T021. Whichever merges second will need a rebase.

🤖 Generated with Claude Code

adamjohnwright and others added 3 commits November 14, 2026 02:19
The user decided on 14 Nov 2026 that the analysis report prints these
two kinds of reference as today's report does. Today's form is read
from analysis-report's ApaStyle: a web page's title and "Retrieved
from" its address, without authors or year; a book's authors and
year, then its chapter's title and the book's parted by a comma, in
italics, then its pages; no publisher or ISBN. So what T019 read as a
book's publisher after a comma is the book's title (research R9).

- Spec 001's reference() is shared through sectionHtml, so the report
  gets its own form, reportReference, passed in; spec 001's book is
  unchanged. Whether it changes too is left as a follow-up.
- The address and publisher come from spec 001's literature query as
  it is; no field added.
- compare-report's reader leaves out pdf-export's list number on a
  reference with no year, which a web page in today's form has none of.
- Tests, each seen failing without its change: the fixture graph's
  book and web page in the report's form, spec 001's unchanged; a
  book and a web page in today's form and the report's agreeing in
  compare-report, its today's-form helper taught both from ApaStyle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps both decisions: R9's Modified row as listed (#217) beside the
references' note, and T026 before T027.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit 55cde47 into main Nov 14, 2026
2 checks passed
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