Skip to content

fix(inclusion): propose portable leaf-count limits - #183

Draft
dinakarjs wants to merge 1 commit into
agentrust-io:mainfrom
dinakarjs:fix/inclusion-safe-integers
Draft

dinakarjs wants to merge 1 commit into
agentrust-io:mainfrom
dinakarjs:fix/inclusion-safe-integers

Conversation

@dinakarjs

Copy link
Copy Markdown
Contributor

Current inclusion verifiers and the registry schema accept counts beyond the proposed portable integer range discussed in trace-spec#630. This candidate limits leaf_count to 1..9007199254740991 in the schema, installed library and standalone tool, and rejects oversized CLI fields with field-specific diagnostics. Valid leaf indices remain below the declared count. Leaf hashing is unchanged.

Draft / owner decision required. agentrust-io/trace-spec#630 is still open. This PR proposes the implementation follow-up; it does not adopt a normative rule or authorize rejecting historical entries before maintainer agreement. It is separate from merged #163, which addressed types rather than the upper bound. No matching open upper-bound fix was found in the search.

Validation on Linux/Python 3.12 at ae8aafa: python -m unittest discover -s tests passed all 480 tests; ruff check . and git diff --check passed. Dependencies installed from the hashed CI/witness/runtime requirements. Three new test methods exercise schema, both verifier implementations and both CLIs; MAX is accepted and MAX+1 is refused, with a rightmost oversized-index proof as a separate refusal. Each of the four changed validation files was individually restored to base, keeping the tests, and the focused suite failed. The installed CLI test pins the field-specific error as well as refusal. These are synthetic proof arithmetic controls without allocation of the declared tree. Signature verification is explicitly disabled only in the inclusion CLI tests.

Scope limits: no live registry traversal, historical-entry inventory, hardware validation or new signature policy. Independent review, policy agreement and hosted CI remain pending.

Prepared with OpenAI Codex; DCO-signed.

Align schema, library, standalone tool and CLI candidate bounds.

Signed-off-by: Srinivasa Consultants <78673153+dinakarjs@users.noreply.github.com>

This branch has not been deployed

No deployments
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