Skip to content

Run the tests against go-age 1.4.0 - #150

Merged
pscheid92 merged 2 commits into
mainfrom
test/go-age-1.4.0
Dec 3, 2026
Merged

pscheid92 merged 2 commits into
mainfrom
test/go-age-1.4.0

Conversation

@pscheid92

@pscheid92 pscheid92 commented Dec 3, 2026 •

Copy link
Copy Markdown
Owner

go-age v1.4.0 was released on 2026-12-01. This moves CI to it, fixes the one test it breaks, and records what the release changed for a library. No library code changes.

The test

age-keygen in 1.4.0 makes a post-quantum key unless told otherwise (-pq=false), and one interop test took the key for an X25519 one. AgeSharp read the key correctly; only the assertion was out of date.

The test is now a theory over three cases: -pq=false, -pq, and no flag, where the key is read as whichever kind it is. It also checks something it did not before: the recipient AgeSharp works out from the key equals the # public key: line age-keygen wrote beside it. No other test runs age-keygen.

Both suites pass against 1.4.0 locally, in the default and the portable build (1,176 vectors; 1,717 unit tests, 3 skipped). I did not run them against 1.3.2; that both flags exist there is from reading its usage text. CI ran all four jobs with AGE_VERSION: 1.4.0.

What 1.4.0 changed, and where AgeSharp stands

From the diff v1.3.2..v1.4.0 of go-age (20 commits). CLI-only changes are left out: the post-quantum warnings, the output-file check, the man pages.

Already the same

go-age change AgeSharp
armor: a line is bounded when reading (1228921). 64 MiB without a newline is refused before 1 MiB is read. Age/Format/ArmorLineFramer.cs:46 refuses a line over 1,024 bytes. Checked with go-age's own test input, with and without the begin line: refused after 4,096 bytes read.
plugin: control characters in a plugin's error are replaced (620b91b). Age/Recipients/PluginRecipient.cs:135 and PluginIdentity.cs:156 write them out through UntrustedText.Escape.
plugin: control characters in a plugin's message are replaced in the terminal UI, not in the client (620b91b). The client passes messages on as sent (Age/Plugin/PluginPrompts.cs:62), and IPluginCallbacks tells the host to replace them.
agessh: the recipients have a String method, the authorized_keys line without a comment (c602496). SshRsaRecipient.cs:35 and SshEd25519Recipient.cs:31 return the same form.
internal/stream: the reader reuses one output buffer instead of allocating one per chunk (69eda84). Allocation only, no change in behaviour. Nothing to compare. (Age/Crypto/DecryptStream.cs:207 tells a final chunk by reading one byte ahead, so it never tries a chunk twice.)

Different (left as they are; listed in TODO.md as open decisions)

  1. Tagged recipients write new stanzas (1ea02ee, 3b1dac5; age, piv-data, piv-hybrid: final changes to migrate age to PQ C2SP/C2SP#402). go-age now writes p256tagv2 and mlkem768p256tagv2, whose tag is computed from the whole hash of the whole recipient, and never the legacy ones. AgeSharp writes the legacy p256tag and mlkem768p256tag (Age/Recipients/AgeProtocol.cs:17-21, TaggedStanza.cs:43), whose tag uses four bytes of the hash, so files to one recipient can be linked by trying 2^32 values. Files AgeSharp writes stay readable by identities that know the legacy stanzas.
  2. No limit on stanzas when writing (2fceb23). go-age refuses to write a header with more than 1,024 stanzas. AgeSharp's BuildHeader (Age/Recipients.cs:353) has no such check. Checked: encrypting to 1,025 recipients succeeds, and reading the file then fails with header contains more than 1024 recipient stanzas.
  3. A passphrase's labels (29ead69). go-age's passphrase recipient now declares postquantum beside its random label. AgeSharp's Passphrase declares none (Age/Recipients/Passphrase.cs:26). No file differs, since a passphrase is never mixed with another recipient; it matters to code that reads labels.
  4. Post-quantum-only parsing and deprecations (b2e1f43). go-age adds age.ParsePostQuantumRecipients and tag.ParseHybridRecipient and deprecates the functions that make or parse non-post-quantum recipients. AgeSharp has neither. Both would be public API.
  5. A plugin's error of several lines (620b91b). go-age keeps line breaks and tabs. AgeSharp writes them out as \n and \t on one line (Age/UntrustedText.cs:58-66).
  6. Documentation. go-age's package documentation and age-keygen now start from post-quantum keys. AgeSharp's README starts from X25519 (README.md:73). docs/FEATURE_COMPARISON.md still describes go-age 1.3.2, as of its date.

go-age 1.4.0's age-keygen makes a post-quantum key unless told otherwise,
and the test took the key for an X25519 one. Each kind is now asked for by
name (-pq=false, -pq), and the default is read as whichever it is.

The test also checks what it did not before: that the recipient AgeSharp
works out from the key is the public key age-keygen wrote beside it.
Released on 2026-12-01. TODO.md lists what the release changed for a
library and where AgeSharp stands on each; the differences are left as
open decisions.
@codecov

codecov Bot commented Dec 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.65%. Comparing base (1248ab9) to head (a658867).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #150   +/-   ##
=======================================
  Coverage   97.65%   97.65%           
=======================================
  Files          77       77           
  Lines        5064     5064           
  Branches      692      692           
=======================================
  Hits         4945     4945           
  Misses         73       73           
  Partials       46       46           
Flag Coverage Δ
macos-latest 97.61% <ø> (ø)
ubuntu-latest 97.61% <ø> (ø)
windows-latest 97.55% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pscheid92
pscheid92 merged commit bbd303c into main Dec 3, 2026
6 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