Repository navigation
Conversation
…ontract Implement the PR 1 foundation of ADR 0154 (AISDLC-576): a pure internal/telemetry/tracecontext package with the versioned immutable work-item identity and deterministic fallback derivation (D01), and the v1 Ed25519-signed fixed-layout envelope with strict bounded parsing and pure admission (wire D02). Both design gates were resolved with maintainer agreement; docs/reference/trace-context.md documents the contract and the tests freeze golden wire vectors for all later PRs. Thread the immutable database IDs through the forge and tracker models: forge.Issue.ID, forge.ChangeProposal.ID, tracker.Issue.ID, and the Jira project reference, populated by the GitHub adapter (REST id and GraphQL databaseId), the GitLab adapter (database id, not the IID), and the tracker clients, with fakes synthesizing IDs in a distinct space. Normalized events are unchanged in this slice; runtime admission wiring follows in PR 3. Admission never returns dispatch permission, sampling flags, tracestate, or baggage; pending markers grant neither context nor links. Signed-off-by: Dharit Shah <dhshah@redhat.com>
Preserve full-width GitHub IDs and Jira project identity through adapter and tracker boundaries. Reject malformed verification keys and noncanonical signed instances without granting trace context. Add independent wire and fallback vectors, stable-anchor exporter checks, and regression coverage for the review findings. Correct the protocol reference and retain the explicit pending and unresolved states. Signed-off-by: Dharit Shah <dhshah@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 4:46 PM UTC · Completed 4:59 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.26 |
Contributor
Author
|
Superseded by #9084 on |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Review skipped — this PR is already closed. The Posted by fullsend post-review check |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the shared identity and authentication contract needed to correlate
independent agent launches working on the same issue or change proposal, as
defined by ADR 0154.
The foundation gives later runtime integration a deterministic way to recover
an entity's trace context and a strict boundary for deciding whether stored
trace metadata is trustworthy.
Entities are identified by their canonical forge instance, immutable container
and entity database IDs, and entity kind. Signed metadata additionally binds
the context to an installation. When stored context cannot be admitted, a
versioned SHA-256 derivation produces a stable TraceID and synthetic anchor
SpanID from the resolved entity identity. This lets separate processes agree
without shared state, keeps renames stable, and gives moves between containers
a new binding. Missing identity components remain explicitly unresolved.
The new pure
internal/telemetry/tracecontextpackage defines a bounded,fixed-layout Ed25519 envelope and validates its signature, version, binding,
context, nonce, and provenance against the caller's trusted identity and
configured verification keys. A bound envelope can admit context; a pending
creation marker grants no context or links; invalid or conflicting metadata
selects fallback. Ordinary created work retains a distinct TraceID with an
authenticated source link, while scenario-scoped work must inherit its
scenario TraceID. Trace admission remains independent of dispatch permission.
The PR also carries immutable IDs through forge and tracker adapters, preserves
full-width IDs during cross-repository creation, and documents the exact wire
format and fallback derivation. Independent fixtures, adapter regressions,
cross-process checks, and SDK exporter assertions exercise these contracts.
This supplies the foundation for subsequent carrier publication, protected-key
lifecycle, and production runtime integration.
Related Issue
Part of #9060.
Changes
internal/telemetry/tracecontextpackage with immutable identity,deterministic versioned fallback, canonical instance validation, and explicit
unresolved identity. Fallback excludes installation identity; rename is
stable and a move between containers creates a new binding.
FSTCv1 binary contract using standard-library Ed25519,authenticated installation/binding/context/provenance/nonce, an 8-byte key
selector, and bound/pending domains. Malformed input or verification keys
yield fallback. Identical carriers are accepted; conflicting carriers fall
back. Pending grants no context or links; admission never grants dispatch.
ordinary created work; scenario provenance requires the scenario TraceID.
Synthetic unexported anchors and distinct operation SpanIDs are an explicit
protocol choice. OpenTelemetry supports custom ID generators.
through adapters, tracker models, and fakes. Cross-repo GitHub creation requests
fullDatabaseIdand preserves numeric/string BigInt values. Tracker readsresolve
ContainerID; create responses remain unresolved until trusted read.coverage, independent-process and concurrency checks, SDK exporter lifecycle
assertions, adapter HTTP regressions, fuzz seeds, and the public BT dependency
guard. Publish
docs/reference/trace-context.mdand navigation links.Carrier publication, key provisioning/lifecycle, production runtime admission,
creation activation, and scenario collection are subsequent delivery slices.
Signing remains host-side; this PR does not activate runtime trace continuity.
Testing
make lintpasses (changes staged first); commit hooks pass.acceptance, lost IDs, and missing tracker project search field before fixes;
the same targeted command passed afterward. Precomputed bytes reach Parse/Admit.
vectors and six signed-wire vectors pass.
376/404 = 93.07% versus pinned base
04fc17ae2(Go block-to-line mapping,not Codecov status).
CLI/repos/layers/mintcore.
with exactly
TestApplyCIServerTLSCA_TrustsPrivateCAAndRejectsUntrustedexcluded.
make go-vetpasses before and after rebase.go test -race -count=1passes for telemetry, tracecontext,forge, GitHub, external tracker adapters and all public BT packages. GitLab
passes with the same exact CA-test exclusion. Upstream GHCR image-pull tests pass.
The branch was rebased onto
90b7310ff; the entire product patch isbyte-for-byte unchanged from the verified
04fc17ae2-based tree. Coverage andthe full-root results below are explicitly pre-rebase evidence.
Full root-module result and baseline comparison
go test -race -count=1 ./...completed with exit 1: 70 packages passed;16 top-level tests failed across five packages. Every failing test was
reproduced on a clean detached
04fc17ae2worktree using exact-name race-testfilters. No race detector report was emitted.
internal/cliinternal/forge/gitlabinternal/repos/varversus/private/varpath comparisoninternal/runtimeflock/gateway exit 91, shellunset '['rejection, trusted CLI lookup failuresinternal/scaffoldarm64rejected before the expected offline curl stubThese are host-baseline reproductions, not a green full-suite claim. An
additional isolated current-tree path-test attempt timed out without output;
the completed root/base runs independently establish that failure.
Draft gates and evidence limits
cases stopped at
Sign: not implemented, and original goldens were frozenafter GREEN. Corrective behavioral RED and independent verification do not
retroactively establish the missing original RED.
No live-adapter or live-scenario validation has run. SDK exporter tests prove
foundation usage, not production runtime wiring. Detailed logs and coverage
profiles remain local; the result summaries above are published evidence, not
uploaded CI artifacts. Local planning files are excluded from the product PR.
Checklist
without changing a shipped public contract.