Skip to content

Add a tlog-policy parser - #269

Merged
AlCutter merged 3 commits into
transparency-dev:mainfrom
BenBirt:claude/tlog-policy-parser-feasibility-u7w89l
Jul 31, 2026
Merged

Add a tlog-policy parser#269
AlCutter merged 3 commits into
transparency-dev:mainfrom
BenBirt:claude/tlog-policy-parser-feasibility-u7w89l

Conversation

@BenBirt

@BenBirt BenBirt commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@BenBirt
BenBirt requested a review from a team as a code owner July 24, 2026 11:31
@BenBirt
BenBirt requested a review from mhutchinson July 24, 2026 11:31
@google-cla

google-cla Bot commented Jul 24, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@codecov-commenter

codecov-commenter commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.72165% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.66%. Comparing base (fa00c16) to head (88b1154).
⚠️ Report is 181 commits behind head on main.

Files with missing lines Patch % Lines
policy/tlog_policy.go 90.72% 9 Missing and 9 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #269      +/-   ##
==========================================
- Coverage   82.57%   79.66%   -2.91%     
==========================================
  Files           5        9       +4     
  Lines         241      890     +649     
==========================================
+ Hits          199      709     +510     
- Misses         30       99      +69     
- Partials       12       82      +70     

☔ 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.

@BenBirt
BenBirt force-pushed the claude/tlog-policy-parser-feasibility-u7w89l branch from c3b8c21 to d94901d Compare July 24, 2026 12:27

@mhutchinson mhutchinson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but I'd like to have @AlCutter approve too.

@mhutchinson
mhutchinson requested a review from AlCutter July 27, 2026 09:50
Comment thread policy/tlog_policy.go
// log <vkey> [<url>]
type Log struct {
// Verifier verifies this log's checkpoint signatures. Its Name() is the
// key name from the vkey, which per the spec MUST correspond to the

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, tlog-checkpoint says "The log’s key name in its signature line SHOULD match the origin line".

While mostly it'd be cool if everyone treated that as a MUST, MTC unfortunately doesn't. I think it's okay, in that Satisfied will still works even if Verify doesn't, so mostly just flagging it for thoughts rather than requesting any particular changes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comes from https://c2sp.org/tlog-policy#defining-a-log: "name MUST correspond to the log's origin line".

It's tricky because - as far as tlog-policy is concerned, I think (?) this must hold true (for at least Verify) to be able to function.

But yeah, tlog-checkpoint clearly differs on this point, presumably to allow flexibility in how checkpoints are verified.

I think this probably nets out as: usecases in which the key name in the signature does NOT match the origin line should not use tlog-policy (at least not with log lines specified - remember they are optional). And if/when there are well-specified mechanisms for identifying the origin signatures in the checkpoint, we should update tlog-policy to include those (if at all possible).

WDYT?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that seems reasonable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @rgdd @niels-moller who might be interested in this discussion

Comment thread policy/tlog_policy.go Outdated
Comment thread policy/tlog_policy.go Outdated
Comment thread policy/tlog_policy.go Outdated
@BenBirt
BenBirt requested a review from AlCutter July 31, 2026 08:59
Comment thread policy/tlog_policy.go Outdated
@BenBirt
BenBirt requested a review from AlCutter July 31, 2026 12:35
BenBirt added 3 commits July 31, 2026 13:01
A new `TLogPolicy` type exposing `Marshal`/`Unmarshal` functions, and `Satisfied`/`Verified` for checking quorum satisfaction / verifying checkpoints.
@BenBirt
BenBirt force-pushed the claude/tlog-policy-parser-feasibility-u7w89l branch from f254a43 to 88b1154 Compare July 31, 2026 13:01
@AlCutter
AlCutter merged commit 56379ca into transparency-dev:main Jul 31, 2026
14 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.

4 participants