Skip to content

feat: transient pubinfo templates not carried over on supersede/override/derive/use - #647

Merged
tkuhn merged 1 commit into
masterfrom
feat/transient-pubinfo-templates-606
Aug 25, 2026
Merged

feat: transient pubinfo templates not carried over on supersede/override/derive/use#647
tkuhn merged 1 commit into
masterfrom
feat/transient-pubinfo-templates-606

Conversation

@tkuhn

@tkuhn tkuhn commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Closes #606

What

Adds the nt:TransientTemplate flag: a pubinfo template so flagged has its filled content bound to the one nanopub it was published with. When that nanopub is used as a fill source (supersede, override, derive, use/fill-all), the template's statements are consumed by throwaway contexts and discarded — they neither carry over into the new nanopub nor fall through to the "could not be filled in" warning or the hand-coded-statements fallback. The flag is checked on the latest template version, so flagging a template also covers nanopubs created with its older versions.

Also in this PR:

  • A change-note field is offered by default (removable) when superseding or overriding a nanopub.
  • Throwaway contexts clear the preset creator slot so other people's dct:creator triples are consumed as well; the source creators' foaf:name triples are dropped like the session user's already was.
  • The hand-coded catch-all context is filled last, after that cleanup, and dropped when nothing is left for it (its statement is required, so an empty section blocked publishing).

Published templates (live)

Template New head Change
Defining a publication info template (meta) RA3KyKGBWWXKZa-Tgq1XW8djl-9veFZDC2lcXIOeNz1WE type statement repeatable; offers "Transient template"
Pubinfo template: Derived RA7NZ9N1vb-mbTo6pOyR14fdbQ8PpFtJHTY3UBPb6vMh4 transient
Pubinfo template: Change note RAKc76yHLDbloE6ObluzYQsfX37v6qrZXbYeIKpe8-YUo transient; statement optional
Pubinfo template: Creator RA-N4_kFxcruvBTlo1yJv29E4SLOXsx5KO_th69PprMrA transient

The term is defined locally in Template.java until it is added to nanopub-java's NTEMPLATE and the ntemplate ontology.

Verification

  • TransientTemplateTest (flag parsing); PublishForm/fill test suites green (42 tests).
  • E2E on an isolated instance overriding/superseding/deriving a nanopub with 7 derivation links, a change note and two other creators: all discarded, fresh derivation/supersedes link kept, change-note field offered on override and supersede only, Preview with an empty note produces a clean nanopub.

🤖 Generated with Claude Code

…ide/derive/use

Introduces the nt:TransientTemplate flag (issue #606): a pubinfo template so
flagged has its filled content bound to the one nanopub it was published
with. When that nanopub is used as a fill source, the template's statements
are consumed by throwaway contexts and discarded, so they neither carry over
into the new nanopub nor fall through to the unused-statement warning or the
hand-coded-statements fallback. The flag is checked on the latest template
version, so flagging a template also covers nanopubs created with older
versions of it.

Along with it:
- A change-note field is offered by default (removable) when superseding or
  overriding a nanopub.
- Throwaway contexts clear the preset creator slot so other people's
  dct:creator triples are consumed too, and the source creators' foaf:name
  triples are dropped like the session user's.
- The hand-coded catch-all context is filled last, after that cleanup, and is
  dropped when nothing is left for it (its statement is required, so an empty
  section blocked publishing).

The Derived, Change note and Creator pubinfo templates are published as
transient; the change-note statement is optional in its latest version.

Closes #606

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tkuhn
tkuhn merged commit ecbb932 into master Aug 25, 2026
8 checks passed
@tkuhn
tkuhn deleted the feat/transient-pubinfo-templates-606 branch August 25, 2026 14:16
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.

flag for pubinfo templates to not carry over content when superseding/overriding/deriving

1 participant