Skip to content

feat(#9060)!: provision and rotate GitHub trace signing keys in repos install - #9477

Merged
dhshah13 merged 12 commits into
fullsend-ai:mainfrom
dhshah13:feat/github-trace-key-provisioning
Nov 17, 2026
Merged

dhshah13 merged 12 commits into
fullsend-ai:mainfrom
dhshah13:feat/github-trace-key-provisioning

Conversation

@dhshah13

@dhshah13 dhshah13 commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Third slice of the trace signing key work in #9060 (ADR 0154), after #9321, #9322 and #9391. fullsend repos install now provisions and rotates the signing keys of GitHub repositories: the installation ID and public keys go in the repo's repos.yaml entry as config.trace_context, the private seed in FULLSEND_TRACE_SIGNING_KEY, and its key ID in the FULLSEND_TRACE_SIGNING_KEY_ID variable from the design note on #9060. Nothing reads the key at run time yet; GitLab keys, keys from install flags, removing a retained key and delivery to runs come later.

Related Issue

Part of #9060

Changes

  • internal/repos/trace_keys.go: EnsureTraceSigningKeys plans each selected GitHub repo's key before repos.yaml is written (a fresh install; a recovery when the secret is missing or the key ID variable is absent or names a retained key; a rotation) and records the block in the repo's entry. A recovery moves the previous active key to retained, or replaces it when the secret cannot hold it: when the variable names a retained key and the committed config does not list the active key, or when neither the variable nor the secret exists and no block of the installation is committed. Before any edit it refuses an entry that conflicts with the committed trace_context, the variable or another entry's installation ID, a variable that is not a key ID, and a plain run's recovery that a read-only manifest cannot record. It returns those refusals with the plans, so only the refused repo fails; a read error, or --rotate-trace-signing-key from a read-only manifest, stops the run.
  • internal/repos/trace_keys.go and internal/repos/converge.go: before the scaffold or config commit, convergeTraceSigningKey reads the variable again and stops unless it is unchanged, then deletes the variable, writes the seed and sets the variable, each step only after the one before succeeds. A failed step stops that repo before its commit. When the seed or variable write fails, the error says to keep and commit the repos.yaml the run wrote and to retry with it, since the secret may already hold the new seed.
  • internal/repos/manifest_edit.go and internal/repos/managed_config_writeback.go: carveOutForForge returns the name of the glob it copied, in place of the forge name no caller used. The progress line of the edit that copies a glob-covered repo into its own entry, the first-install tracker default or trace_context, names the new entry and that glob.
  • internal/repos/manifest.go, internal/repos/manifest_edit.go and internal/repos/trace_keys.go: glob expansion records the glob entry that selected each repo, and the key step copies that entry when it gives a glob-covered repo its own entry, so recording keys keeps the settings selection resolved, even when an earlier glob matches the repo only if case is ignored. The first-install tracker default and the entry suggested for a read-only manifest still copy the first glob that matches ignoring case (repos: a glob carve-out copies a different glob entry than selection matched when the repository name differs in case #9572).
  • internal/repos/managed_config_writeback.go: ManifestReadOnly also counts a repos.yaml on a read-only file system as read-only. Every fresh GitHub install now writes repos.yaml, so a manifest on a read-only mount failed the install at that write. Install, repos uninstall and repos set now treat it like a file without write permission.
  • internal/cli/repos.go: install runs the key preflight before the first-install tracker default and the repos.yaml write, persists its edits under the compare-before-write guard and the size limit, and adds --rotate-trace-signing-key. A repo whose keys the preflight refuses is skipped like an adoption failure: no key, no first-install tracker default or glob carve-out, no later preflight and no convergence; it is listed as FAILED while the other repos converge. A repo that convergence leaves out, refused or not, no longer counts for the sign-off identity lookup (SignoffForgesFor in internal/repos/manifest.go takes the list). The token-scope check moves before any repos.yaml edit. The sign-off identity lookup, and the check that a selected repo uses --fullsend-binary or --fullsend-source, run on the edited manifest just before the repos.yaml write, since an entry copied from a glob takes that glob's settings; a failure in any of these checks leaves the file unchanged and writes no key. repos uninstall --help now says only GitLab uninstall deletes .fullsend/config.yaml.
  • internal/forge/forge.go, internal/repos/uninstall.go and internal/repos/drift.go: forge.VarTraceSigningKeyID names the variable. On GitHub, uninstall deletes it and the orphan check counts it as managed.
  • Docs: the key lifecycle in docs/reference/trace-context.md; in docs/cli/repos.md, the Trace signing keys section, the flag, the uninstall notes, the read-only manifest definitions and which checks run before and after the repos.yaml write; docs/reference/config-reference.md; the variable and secret inventories; the glob carve-out notes in the getting-started guides; cli-internals.md; and the parity paragraph in docs/contributing/go-code.md. What telemetry: implement ADR 0154 trace continuity #9060 still owes is marked planned.
  • Accepted ADR edit: the status note of ADR 0154 (docs/ADRs/0154-correlate-work-item-and-behaviour-scenario-traces.md) now says repos install provisions the signing keys of GitHub repositories; the rest stays pending. Context, Decision and Consequences are unchanged.

Behaviour notes

  • Breaking (commit feat(#9060)!): install now writes config.trace_context into repos.yaml on a fresh GitHub install from a writable file and on the first --rotate-trace-signing-key run of an existing install. Keep and commit those edits: a later install from a copy without them fails that repository, except after a run that failed writing the seed or the key ID variable, when it replaces the key that run may have written without retaining it. A lost entry can be rebuilt from the block in the committed .fullsend/config.yaml. An entry that declares trace_context by hand gets a new key pair, as a recovery, on its first install with this release: the declared active key moves to retained, or is replaced when neither the secret nor the variable exists and no block of this installation is committed; from a read-only repos.yaml that repository fails.
  • Releases: v0.37.0 through v0.55.0 refuse a repos.yaml that contains trace_context, and earlier releases cannot read this manifest format. Releases from v0.56.0 without this change accept it but do not manage FULLSEND_TRACE_SIGNING_KEY_ID: their repos status reports the variable as orphan drift and their repos uninstall leaves it, after which this release refuses the repo when it is declared again without keys, until the variable is deleted or the entry's trace_context is restored. Use a release with this change for every repos command on such a manifest. Runs are unaffected: releases before v0.56.0 ignore the block in .fullsend/config.yaml, and v0.56.0 and later validate it.
  • Existing installs: a plain run gives no keys to an existing install whose entry has no trace_context; its first --rotate-trace-signing-key run does, one opt-in per repository. Plain-run provisioning would, on the first upgrade, copy every glob-covered install into its own entry and make every existing install depend on a committed repos.yaml edit.
  • Glob carve-outs: before, only the first-install tracker default copied a glob-covered repo into its own entry. Now every GitHub repo that only a glob covers gets one when install first records its keys, copied from the glob entry that selected it, and the output names the new entry and the glob. Later glob edits, such as a fullsend_ref pin, kill_switch or role and resource restrictions, no longer reach that repo. Fleet-wide controls belong in github.config, defaults.config or github.fullsend_ref, but a copied entry keeps the values it copied and they still apply, so a control moved off the glob also has to be deleted from each copied entry.
  • On GitHub, the Removed: line of repos uninstall counts one more variable, since deleting a missing variable returns no error.
  • Install reads FULLSEND_TRACE_SIGNING_KEY_ID once per selected GitHub repo in the preflight and once more before each key write. It also checks that FULLSEND_TRACE_SIGNING_KEY exists when the entry has keys, or when that decides whether a keyless repo was fully uninstalled.
  • Install and dry run print one line per selected GitLab repo saying keys are not provisioned there yet, and write no key or variable there, even with the flag.
  • A dry run discards the keys it generates, so its new key IDs, and a fresh install's installation ID, differ from the live run's.
  • Known limit: a glob-covered GitHub repo created during a run, after the preflight listed the org, is installed without a key. Later plain runs leave it keyless; only --rotate-trace-signing-key gives it keys (repos install: convergence lists glob orgs again after the preflights #9571).
  • Known limit: a run that stops after writing repos.yaml and before a repository's key step records a key it never writes. The next run replaces it, unless FULLSEND_TRACE_SIGNING_KEY_ID is absent while FULLSEND_TRACE_SIGNING_KEY exists, or the install's configuration was committed before an --uninstall-only; then it retains it, one retained key per failed attempt (repos install: a trace key recorded before convergence stays retained when the run stops before its key step #9570).
  • Known limit: on an existing install, a rotation or a recovery writes the new seed before the commit that lists its public key is on the default branch: until the install pull request merges (also when --direct falls back to a pull request), or after a failed commit until a later run's commit lands. Until then the default branch's .fullsend/config.yaml does not list the key the secret holds. #9060 records this for the delivery of the key to runs.

Review bot

The review bot's summary lists four ids with no thread:

  • f_64a622039ca71bb4 (glob carve-out): intentional. trace_context is per repository, and an explicit entry replaces its glob entry instead of layering over it, so recording a key needs the repository's own entry; a trace_context-only entry would drop the glob's other settings. The new entry copies the glob entry that selected the repository, install names it, and docs/cli/repos.md (Trace signing keys) says where fleet-wide controls go. repos: a glob carve-out copies a different glob entry than selection matched when the repository name differs in case #9572 tracks the older first-install tracker default, which can copy a different glob than selection matched.
  • f_b6828bd56b07ebc6 (older releases): declared with !, the BREAKING CHANGE footer and the Releases note above, which now covers v0.56.1.
  • f_5aa71237027ae848 (hand-declared trace_context): declared in the Breaking note above; keys supplied through install flags come in a later PR.
  • f_6f3dad5f71597f20 (flag semantics): settled in the Existing installs note above.

Testing

  • make lint passes: pre-commit run --from-ref b2945ba14 --to-ref HEAD runs its hooks, semgrep and gitleaks included, over every changed file.
  • Tests added/updated for new or modified logic: internal/repos/trace_keys_test.go, internal/repos/trace_keys_converge_test.go and internal/cli/repos_trace_keys_test.go are new, and TestIsWriteDenied is new in internal/repos/config_layers_test.go. Of 86 mutants of the new code, 82 make a test fail. One survivor drops earlier failures from a failed key step's error; another makes the same change on the fresh path, where the key step's error has no earlier failures to keep, so no test can catch it. A third keeps the old permission-only check in ManifestReadOnly; only the read-only disk-image check below catches it. The fourth matches the recorded glob ignoring case, which is equivalent because manifest validation rejects entry names that differ only in case.
  • go test -race -count=1 over internal/repos, internal/cli, internal/forge/... and internal/scaffold at the head, and over every package at 202a2f5 (internal/runtime in a separate run, internal/mintcore with -tags github): 0 data races. On macOS, five tests fail, as they do on v0.56.0 and v0.56.1 (CA pool, temp path, two gateway-refresh timings, the arm64 install script). The two TestRunAgent tests that call the live GitHub API (TestRunAgent_URLRefsNoOrgConfig calls api.github.com and hangs when the call is rate limited #9372) were skipped. golangci-lint run --new-from-rev b2945ba14 ./... reports 0 issues.
  • Each of the 12 commits, checked out alone, builds, vets, and passes pre-commit and the race tests of internal/repos, internal/forge/... and internal/scaffold and of the repos commands in internal/cli, apart from the same macOS failures.
  • A repos.yaml on a read-only file system, checked on macOS with a read-only disk image (not in CI): install converges without keys and prints the not-provisioned notice, where it failed at the repos.yaml write before; repos uninstall refuses the manifest before any teardown; repos set reports the read-only manifest.
  • Patch coverage: locally, 448 of the 481 added executable Go lines run in the tests (93.1%). The 33 others are error-return lines and carveOutGlobEntry's return for a name no glob covers.

Checklist

  • PR title follows Conventional Commits (correct type, ! for breaking changes)
  • Commits are signed off (DCO) — human and human-directed agent sessions only
  • I wrote this contribution myself and can explain all changes in it

…step

EnsureTraceSigningKeys plans the trace signing key of each selected
GitHub repository before repos.yaml is written: a fresh install,
recovery when FULLSEND_TRACE_SIGNING_KEY is missing or
FULLSEND_TRACE_SIGNING_KEY_ID is absent or names a retained key, or a
rotation on request. It records the installation ID and public keys in
the repository's repos.yaml entry, carving a glob-covered repository
into its own entry. Before any edit it refuses an entry that
contradicts the committed trace_context or the key ID variable, a key
ID variable that is not 16 lowercase hex characters, and a read-only
manifest that must record a key. GitLab repositories are skipped
without any read.

convergeTraceSigningKey writes a plan before the scaffold or config
commit. It reads FULLSEND_TRACE_SIGNING_KEY_ID again and stops unless
its presence and value are unchanged, then deletes it, writes the seed
and sets it to the new key ID, each step only after the one before
succeeds. Nothing calls EnsureTraceSigningKeys yet.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
…ys in repos install

repos install now plans trace signing keys after it records the
install defaults and before it writes repos.yaml. It persists the
trace_context edits with its other manifest edits, under the
compare-before-write guard and the size limit, and convergence writes
FULLSEND_TRACE_SIGNING_KEY and FULLSEND_TRACE_SIGNING_KEY_ID before the
scaffold or config commit.

- A fresh install from a writable repos.yaml gets a new installation ID
  and key pair. A later run writes a new pair, keeping the installation
  ID and retaining the previous public key, when the secret is missing
  or the key ID variable is missing or names a retained key.
- --rotate-trace-signing-key writes a new pair for a healthy install
  and gives an existing install without trace_context its first keys.
- Install stops before it writes repos.yaml or any key when an entry
  contradicts the committed trace_context or the key ID variable, when
  that variable is not a key ID, and when a read-only repos.yaml must
  record a key. From a read-only repos.yaml, a fresh install without
  the flag goes ahead without keys and says so.
- The token-scope check and the sign-off identity lookup now run before
  install plans any repos.yaml edit, so a failure there leaves
  repos.yaml unchanged instead of recording a key that is never
  written.
- Output shows installation and key IDs, never the seed. The progress
  line of the repos.yaml edit that copies a glob-covered repository
  into its own entry, whether the tracker default or the trace_context,
  names the new entry and the glob. When writing the seed or setting
  the key ID variable fails after the variable was deleted, the error
  says to keep and commit the repos.yaml the run wrote and to retry
  with it, since the seed may have been written. Repositories skipped
  for adoption get no key. GitLab repositories get no key yet, and
  install says so.
- On GitHub, repos uninstall now deletes FULLSEND_TRACE_SIGNING_KEY_ID,
  so its Removed: line counts one more variable, and the orphan check
  counts the variable as managed.
- repos uninstall --help says that only GitLab uninstall deletes
  .fullsend/config.yaml.

BREAKING CHANGE: repos install now records each GitHub repository's
trace signing keys as config.trace_context in its repos.yaml entry, on
a fresh install from a writable repos.yaml and on the first
--rotate-trace-signing-key run of an existing install. A repository
that only a glob entry covers gets its own entry, copied from the glob,
when that happens, so later edits to the glob entry do not reach it;
edit its own entry instead. Keep and commit the repos.yaml edits
install makes: a later install from a copy without them stops the run,
except after a run that failed writing the seed or the key ID
variable, when it replaces the key that run may have written without
retaining it. If the copy with those edits is lost, rebuild the
entry's trace_context from the block in the .fullsend/config.yaml that
the last install committed. An entry that already declares
trace_context by hand gets a new key pair, as a recovery, on its first
install with this release; from a read-only repos.yaml that run stops.
fullsend v0.37.0 through v0.55.0 refuse a repos.yaml that contains
trace_context, and earlier releases cannot read this manifest format.
v0.56.0 accepts it but does not manage FULLSEND_TRACE_SIGNING_KEY_ID:
its repos status reports the variable as orphan drift and its repos
uninstall leaves it, after which this release refuses the repository
when it is declared again without keys, until the variable is deleted
or the entry's trace_context is restored. Use a release with this
change for every repos command on that manifest. Runs are unaffected:
releases before v0.56.0 ignore the block in .fullsend/config.yaml, and
v0.56.0 validates it.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
Document the key lifecycle in the trace context reference, the trace
signing keys section and flag in the repos CLI reference, the
trace_context config reference, the variable and secret inventories,
the glob carve-out and repos.yaml write cases in the guides, and the
parity paragraph in the Go contributor guide. GitLab keys, removing a
retained key, keys from install flags and delivery to runs are marked
planned.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
The ADR 0154 status note now says that repos install provisions the
signing keys of GitHub repositories; the rest stays pending.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
@dhshah13
dhshah13 requested a review from a team as a code owner November 14, 2026 13:14
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Provision and rotate GitHub trace signing keys during repos install

✨ Enhancement 🐞 Bug fix 🧪 Tests 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Provision GitHub trace signing keys during install and retain prior public keys during rotation or
 recovery.
• Refuse conflicting key state before writes, and stop repository commits when key writes fail.
• Document the key lifecycle and cover installation, retry, uninstall, and drift behavior.
Diagram

graph TD
  CLI["Repos install"] --> PLAN["Key preflight"] --> MANIFEST["Manifest entry"] --> CONVERGE["Repo convergence"] --> SECRET["Signing secret"] --> VARIABLE["Key ID variable"] --> COMMIT["Config commit"]
  PLAN --> VARIABLE
  PLAN --> COMMIT
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Serialize installs with a repository lease
  • ➕ Could prevent overlapping installs from changing the seed after the key-ID recheck.
  • ➖ Requires a reliable lease and recovery protocol that this GitHub path does not currently have.
  • ➖ Adds operational complexity across install and uninstall.

Recommendation: Use the PR's preflight-and-convergence approach for this slice: it preserves the manifest as the public-key source of truth and limits partial-write damage without introducing a new coordination system. Its variable recheck is not a lock, so the documented one-install-at-a-time requirement remains important; consider a lease if concurrent installs must become safe.

Files changed (35) +3376 / -153

Enhancement (7) +746 / -37
repos.goWire trace-key planning and rotation into repos install +84/-30

Wire trace-key planning and rotation into repos install

• Adds the rotation flag, runs scope and sign-off checks before manifest edits, and persists key plans through the existing guarded write. Passes plans to convergence and corrects uninstall help text.

internal/cli/repos.go

forge.goName the trace signing key-ID variable +8/-0

Name the trace signing key-ID variable

• Adds a shared constant for the GitHub variable that identifies the last confirmed signing seed.

internal/forge/forge.go

converge.goWrite planned trace keys before repository commits +27/-0

Write planned trace keys before repository commits

• Carries preflight plans into both convergence paths and stops a repository before its scaffold or configuration commit if key convergence fails.

internal/repos/converge.go

drift.goTreat GitHub trace key IDs as managed variables +6/-0

Treat GitHub trace key IDs as managed variables

• Excludes the GitHub key-ID variable from orphan-variable reports without making it required.

internal/repos/drift.go

managed_config_writeback.goIdentify glob origins in manifest writeback progress +9/-6

Identify glob origins in manifest writeback progress

• Tracks the glob copied for a new repository entry and names both entries in tracker-default progress output.

internal/repos/managed_config_writeback.go

trace_keys.goPlan, validate, and converge GitHub trace signing keys +608/-0

Plan, validate, and converge GitHub trace signing keys

• Implements fresh provisioning, recovery, rotation, stale-state refusals, read-only handling, and glob carve-outs. Rechecks the key-ID variable before ordered variable deletion, seed write, and key-ID write, with failures preventing the repository commit.

internal/repos/trace_keys.go

uninstall.goDelete GitHub trace key IDs on uninstall +4/-1

Delete GitHub trace key IDs on uninstall

• Adds the key-ID variable to the GitHub uninstall cleanup list alongside the existing signing-secret cleanup.

internal/repos/uninstall.go

Refactor (1) +20 / -9
manifest_edit.goReturn the source glob when carving out an entry +20/-9

Return the source glob when carving out an entry

• Changes carve-out helpers to return the copied glob's name and adds a shared formatter for manifest-edit progress.

internal/repos/manifest_edit.go

Tests (16) +2127 / -55
repos_inference_auth_test.goAvoid printing secret records in auth assertions +1/-1

Avoid printing secret records in auth assertions

• Checks the count of secret writes without allowing their values into assertion output.

internal/cli/repos_inference_auth_test.go

repos_install_read_counts_test.goAccount for trace-key reads in install tests +19/-7

Account for trace-key reads in install tests

• Verifies the cached preflight read and live pre-write reread of the key-ID variable, including dry-run behavior.

internal/cli/repos_install_read_counts_test.go

repos_managed_config_test.goExpect trace_context in fresh managed overlays +15/-2

Expect trace_context in fresh managed overlays

• Checks that a fresh install records generated trace values and renders them beside the tracker default.

internal/cli/repos_managed_config_test.go

repos_manifest_write_test.goTest guarded manifest writes with generated keys +23/-7

Test guarded manifest writes with generated keys

• Checks that a competing manifest write prevents key writes, while retry provisions the selected repository and retains the other repository's edits.

internal/cli/repos_manifest_write_test.go

repos_safety_order_test.goGuard trace-key edits behind safety checks +21/-9

Guard trace-key edits behind safety checks

• Verifies rejected installs neither report persisted manifest edits nor write forge values, with secret-safe assertions.

internal/cli/repos_safety_order_test.go

repos_trace_keys_test.goExercise trace-key behavior through the install CLI +381/-0

Exercise trace-key behavior through the install CLI

• Covers flag wiring, dry runs, provisioning and rotation, failed-write retries, pre-write refusals, read-only manifests, adoption skips, and pending re-enrollment.

internal/cli/repos_trace_keys_test.go

drift_test.goTest forge-specific trace-key drift handling +49/-0

Test forge-specific trace-key drift handling

• Checks GitHub management versus GitLab orphan reporting and confirms neither trace credential is required.

internal/repos/drift_test.go

install_uninstall_parity_test.goInclude trace credentials in cleanup parity checks +15/-9

Include trace credentials in cleanup parity checks

• Adds the out-of-band GitHub seed and key-ID writes to install/uninstall parity fixtures.

internal/repos/install_uninstall_parity_test.go

managed_config_blocked_install_test.goKeep blocked-install secret assertions value-safe +1/-1

Keep blocked-install secret assertions value-safe

• Tests the absence of secret writes by count rather than printing records containing values.

internal/repos/managed_config_blocked_install_test.go

managed_config_writeback_test.goCheck glob carve-out progress +7/-1

Check glob carve-out progress

• Verifies tracker writeback identifies the new explicit entry and its source glob.

internal/repos/managed_config_writeback_test.go

manifest_signoff_test.goAdapt sign-off carve-out test to the new return value +1/-1

Adapt sign-off carve-out test to the new return value

• Keeps the sign-off copy test aligned with the helper's source-glob return value.

internal/repos/manifest_signoff_test.go

trace_context_helpers_test.goExtend deterministic trace-key test fixtures +29/-10

Extend deterministic trace-key test fixtures

• Adds seed and key-ID helpers and checks that errors never expose signing seeds or verification keys.

internal/repos/trace_context_helpers_test.go

trace_keys_converge_test.goTest ordered key writes and retry outcomes +716/-0

Test ordered key writes and retry outcomes

• Exercises dry runs, write-step failures, variable changes between preflight and convergence, commit failures, uninstall-only recovery, and full re-enrollment.

internal/repos/trace_keys_converge_test.go

trace_keys_test.goTest trace-key planning and preflight refusals +827/-0

Test trace-key planning and preflight refusals

• Covers fresh and healthy installs, rotation and recovery, glob entries, GitLab skips, read-only manifests, malformed variables, committed-key conflicts, and installation-ID collisions.

internal/repos/trace_keys_test.go

uninstall_test.goVerify trace credential cleanup on uninstall +21/-7

Verify trace credential cleanup on uninstall

• Checks GitHub key-ID deletion, preserves GitLab's distinct variable list, and updates expected deletion counts.

internal/repos/uninstall_test.go

scaffold_env_consistency_test.goRecognize the trace key-ID variable in environment checks +1/-0

Recognize the trace key-ID variable in environment checks

• Adds the new forge variable to the canonical names used by scaffold consistency tests.

internal/scaffold/scaffold_env_consistency_test.go

Documentation (11) +483 / -52
0154-correlate-work-item-and-behaviour-scenario-traces.mdMark GitHub key provisioning as implemented +6/-2

Mark GitHub key provisioning as implemented

• Updates ADR 0154's implementation status and identifies GitLab provisioning, key delivery, and runtime integration as pending.

docs/ADRs/0154-correlate-work-item-and-behaviour-scenario-traces.md

repos.mdDocument trace-key install and uninstall behavior +168/-17

Document trace-key install and uninstall behavior

• Explains provisioning, rotation, recovery, refusals, read-only manifests, concurrency limits, compatibility, and the new flag. Clarifies glob carve-outs and GitHub uninstall behavior.

docs/cli/repos.md

go-code.mdRecord trace-key install/uninstall parity obligations +8/-3

Record trace-key install/uninstall parity obligations

• Identifies the new out-of-band GitHub secret and variable writes and their required uninstall cleanup.

docs/contributing/go-code.md

cli-internals.mdList the trace-key rotation flag +1/-0

List the trace-key rotation flag

• Adds the one-run GitHub rotation control to the CLI command overview.

docs/guides/dev/cli-internals.md

migrating-from-github-setup.mdExplain migration-facing manifest edits +14/-5

Explain migration-facing manifest edits

• Lists the rotation control and explains when install creates explicit entries from globs or records trace_context.

docs/guides/getting-started/migrating-from-github-setup.md

operations.mdDescribe the GitHub trace secret and key-ID variable +5/-1

Describe the GitHub trace secret and key-ID variable

• Documents their formats, ownership, cleanup, and the fact that the seed is not yet delivered to runs.

docs/guides/getting-started/operations.md

repo-management.mdClarify read-only and glob-covered installs +13/-2

Clarify read-only and glob-covered installs

• Explains the trace-key exception for fresh installs from read-only manifests and when glob-covered repositories acquire explicit entries.

docs/guides/getting-started/repo-management.md

infrastructure-reference.mdAdd provisioned trace credentials to infrastructure reference +14/-4

Add provisioned trace credentials to infrastructure reference

• Describes the generated seed and key-ID variable while distinguishing provisioning from future runtime delivery.

docs/guides/infrastructure/infrastructure-reference.md

config-reference.mdUpdate trace_context configuration semantics +16/-10

Update trace_context configuration semantics

• Explains GitHub-generated keys, retained-key behavior, installation identity, and persistence in concrete manifest entries.

docs/reference/config-reference.md

trace-context.mdSpecify the GitHub signing-key lifecycle +234/-4

Specify the GitHub signing-key lifecycle

• Adds the provisioning and ordered-write contract, recovery guidance, stale-state refusals, rotation, re-enrollment, and concurrency limitations.

docs/reference/trace-context.md

preflight_read_cache.goDocument trace reads in the preflight cache +4/-4

Document trace reads in the preflight cache

• Clarifies that trace-key preflight shares cached read-only forge state before convergence resumes direct reads.

internal/repos/preflight_read_cache.go

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 1:17 PM UTC · Completed 1:28 PM UTC

Commit: 2fbfafc · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $4.20

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Site preview

Preview: https://fa3ca81f-site.fullsend-ai.workers.dev

Commit: 8b64ef2f23e4d8d5eb0f9d6288682c59a7b44d4e

@qodo-code-review

qodo-code-review Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Overlapping installs can mismatch keys ✗ Dismissed
Description
convergeTraceSigningKey checks the key ID variable, then deletes and replaces the variable and
seed through separate, unlocked API calls before the configuration commit. When two installs of the
same repository use separate manifest copies, both can pass the check and interleave their writes
and commits, leaving the committed public key different from the seed and key ID on GitHub.


Remediation recommended

2. Fleet installs remain keyless ✗ Dismissed
Description
EnsureTraceSigningKeys skips fresh-install key provisioning when repos.yaml is read-only, and
later plain installs do not provision an existing keyless repository. The .fullsend repository’s
Sync Scaffold workflow always makes that manifest read-only and invokes repos install --direct
without the rotation flag, so a GitHub repository it installs without keys stays keyless on
subsequent syncs.

3. New glob-matched repos miss their keys ✗ Dismissed
Description
EnsureTraceSigningKeys builds key plans from the repositories returned by its preflight glob
expansion, but convergence expands the glob again through the live client. If a repository appears
in the organization listing between those expansions, convergence installs it without a key plan;
later plain installs see its workflow and leave it keyless.


Informational

4. ADR status claim has no pinned evidence ✗ Dismissed
Description
The ADR 0154 status note says repos install provisions GitHub signing keys but links only to the
trace-context reference, while the PR description names internal/repos/trace_keys.go and
EnsureTraceSigningKeys without an implementation commit SHA. Because the PR’s only SHA is the base
ref b2945ba14, readers cannot trace the claim to #9060 or this change, or verify it against a
fixed revision if the linked documentation or repos install later changes.

Grey Divider

Context sources
✅ Linked PRs:
  🌐 PR #9321
  🌐 PR #9322
  🌐 PR #9391
✅ Compliance rules (platform): 96 rules
✅ Skills: 5 invoked
  writing-user-docs
  writing-adrs
  check-patch-coverage
  cutting-releases
  adr-corner
✅ Cross-repo context — repo relationships
  Explored: repo: fullsend-ai/experiments (sha: d4292120) — View relationship
  Explored: repo: fullsend-ai/agents (sha: 5fa2e3a3) — View relationship
  Explored: repo: fullsend-ai/test-creator (sha: a5082d20) — View relationship
  Explored: repo: fullsend-ai/pi-anthropic-vertex (sha: d2ecd039) — View relationship
  Explored: repo: fullsend-ai/pi-xai-vertex (sha: a86139bf) — View relationship
  Explored: repo: fullsend-ai/.fullsend (sha: e6bfe5b1) — View relationship
  Explored: repo: fullsend-ai/metrics (sha: 56061ee1) — View relationship
✅ Context preparation
  Commit messages: summarized; full text retained for this review
Review mode: Auto: 🧠 Deep: Many independent stateful security-sensitive paths make missed defects plausible.

Grey Divider

Tip of the day
💡 Did you know, you can enable the Remediation agent and Qodo fixes findings in a dedicated fix PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread internal/repos/trace_keys.go Resolved
Comment thread internal/repos/trace_keys.go Resolved
Comment thread internal/repos/trace_keys.go Resolved
@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Nov 14, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

Large diff across 39 files with breaking manifest changes and moderate git churn is balanced by strong test coverage, zero protected or security-sensitive paths, and close alignment with a planned slice of linked issue #9060.

Previous run

Risk Assessment: moderate (2/5)

Details

Large diff across 39 files with breaking manifest changes and moderate git churn is balanced by strong test coverage, zero protected or security-sensitive paths, and close alignment with a planned slice of linked issue #9060.

Previous run (2)

Risk Assessment: moderate (2/5)

Details

Large diff across 35 files with moderate git churn and breaking manifest changes is balanced by strong test coverage, zero protected or security-sensitive paths, and close alignment with a planned slice of the linked issue.

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Review

Findings

Medium

  • [backward-incompatible] internal/repos/manifest_edit.go — repos install copies a glob-covered repository into its own explicit repos.yaml entry when it provisions or rotates trace keys, including on a plain fresh install. A manifest that relied on one glob entry for many repositories changes shape, and each new entry stops following later edits to the glob. The ! marker, the PR's behaviour notes and the progress line naming the entry and glob all declare it, so this stays advisory; the optional opt-out is the only remaining mitigation.
    Remediation: Confirm the release notes and migration docs describe the carve-out; consider an opt-out.

Low

  • [backward-incompatible] internal/cli/repos.go — A plain repos install on an existing GitHub install now edits repos.yaml (adds config.trace_context) and writes the FULLSEND_TRACE_SIGNING_KEY secret and FULLSEND_TRACE_SIGNING_KEY_ID variable. A read-only repos.yaml makes a fresh install proceed without keys; other key-write failures fail that repository; with --rotate-trace-signing-key the whole run stops. The token-scope and sign-off checks move earlier.
  • [backward-incompatible] internal/repos/trace_keys.go — FULLSEND_TRACE_SIGNING_KEY_ID is a new repository variable that install deletes and re-sets around each seed write. Anything else that owns or lists that name now depends on this lifecycle, and overlapping installs can leave the secret and variable disagreeing (the docs say to run one install per repository at a time).

Earlier findings

  • internal/repos/trace_keys.go:130, pattern-inconsistency — resolved: the incremental diff adds the cfg.Manifest == nil guard in EnsureTraceSigningKeys and TestEnsureTraceSigningKeys_NilManifest.
  • internal/cli/repos.go, breaking-cli — reclassified to info: the vendor/source check differs only in when it runs, with the same error text, and a glob-copied entry takes the glob's settings.

1 finding(s) below the low severity threshold were not posted.

Previous run

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJjb21tZW50IiwiZmluZGluZ3MiOlt7InNldmVyaXR5IjoibWVkaXVtIiwiY2F0ZWdvcnkiOiJiYWNrd2FyZC1pbmNvbXBhdGlibGUiLCJmaWxlIjoiaW50ZXJuYWwvcmVwb3MvbWFuaWZlc3RfZWRpdC5nbyIsImlkIjoiZl82NGE2MjIwMzljYTcxYmI0IiwiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6ImNyb3NzLXJlcG8tY29udHJhY3RzIn0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoiYmFja3dhcmQtaW5jb21wYXRpYmxlIiwiZmlsZSI6ImludGVybmFsL2NsaS9yZXBvcy5nbyIsImlkIjoiZl9iNjgyOGJkNTZiMDdlYmM2IiwiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6ImNyb3NzLXJlcG8tY29udHJhY3RzIn0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoiYmFja3dhcmQtaW5jb21wYXRpYmxlIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL3RyYWNlX2tleXMuZ28iLCJpZCI6ImZfNWFhNzEyMzcwMjdhZTg0OCIsImFjdGlvbmFibGUiOmZhbHNlLCJkaW1lbnNpb24iOiJjcm9zcy1yZXBvLWNvbnRyYWN0cyJ9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImJyZWFraW5nLWNsaSIsImZpbGUiOiJpbnRlcm5hbC9jbGkvcmVwb3MuZ28iLCJpZCI6ImZfNmYzZGFkNWY3MTU5N2YyMCIsImFjdGlvbmFibGUiOmZhbHNlLCJkaW1lbnNpb24iOiJjcm9zcy1yZXBvLWNvbnRyYWN0cyJ9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6InBhdHRlcm4taW5jb25zaXN0ZW5jeSIsImZpbGUiOiJpbnRlcm5hbC9yZXBvcy90cmFjZV9rZXlzLmdvIiwiaWQiOiJmXzJiZDVmMWZkMTUxNTMxZGQiLCJsaW5lIjoxMzAsImFjdGlvbmFibGUiOmZhbHNlLCJkaW1lbnNpb24iOiJzdHlsZS1jb252ZW50aW9ucyJ9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6InBhdHRlcm4taW5jb25zaXN0ZW5jeSIsImZpbGUiOiJpbnRlcm5hbC9yZXBvcy90cmFjZV9rZXlzLmdvIiwiaWQiOiJmXzJlMmE5MDRkYzI2NTU3NzQiLCJsaW5lIjoxMDUsImFjdGlvbmFibGUiOnRydWUsImRpbWVuc2lvbiI6InN0eWxlLWNvbnZlbnRpb25zIn0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoiYXBpLXNoYXBlIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL3RyYWNlX2tleXMuZ28iLCJpZCI6ImZfNmE1M2EyMmM3OTE5ZjdlZCIsImxpbmUiOjUwLCJhY3Rpb25hYmxlIjpmYWxzZSwiZGltZW5zaW9uIjoic3R5bGUtY29udmVudGlvbnMifV0sImRpc3Bvc2l0aW9ucyI6W3siaWQiOiJmXzY0YTYyMjAzOWNhNzFiYjQiLCJzdGF0dXMiOiJvcGVuIn0seyJpZCI6ImZfMmUyYTkwNGRjMjY1NTc3NCIsInN0YXR1cyI6InJlc29sdmVkX2J5X2NoYW5nZSJ9LHsiaWQiOiJmXzZhNTNhMjJjNzkxOWY3ZWQiLCJzdGF0dXMiOiJyZXNvbHZlZF9ieV9jaGFuZ2UifSx7ImlkIjoiZl9iNjgyOGJkNTZiMDdlYmM2Iiwic3RhdHVzIjoib3BlbiJ9LHsiaWQiOiJmXzVhYTcxMjM3MDI3YWU4NDgiLCJzdGF0dXMiOiJvcGVuIn0seyJpZCI6ImZfNmYzZGFkNWY3MTU5N2YyMCIsInN0YXR1cyI6Im9wZW4ifV19 -->

Review

Findings

Medium

  • [backward-incompatible] internal/repos/manifest_edit.go — Recording a trace key now copies every glob-covered GitHub repo into its own repos.yaml entry (carveOutForForge, called from trace_keys.go:228). Later edits to the glob entry, such as a fullsend_ref pin, kill_switch or role and resource restrictions, no longer reach those repos, and a control moved off the glob must also be deleted from each copied entry. The PR now names the entry and glob in install output and documents where fleet-wide controls belong. The behaviour change is still present; this is advisory, so maintainers can confirm that per-repo copies are the intended trade-off.

Low

  • [backward-incompatible] internal/cli/repos.go — Older releases cannot read or manage the new manifest block and variable: v0.37.0 through v0.55.0 refuse a repos.yaml containing config.trace_context, and v0.56.0 and later without this change report FULLSEND_TRACE_SIGNING_KEY_ID as orphan drift and leave it on uninstall. Declared with ! and the Releases note.
  • [backward-incompatible] internal/repos/trace_keys.go — An entry that declares trace_context by hand gets a new key pair, as a recovery, on its first install with this release, and fails from a read-only repos.yaml. Documented as breaking.
  • [breaking-cli] internal/cli/repos.go — repos install now writes the signing-key secret and variable and edits repos.yaml, and can fail a repo where it used to succeed. --rotate-trace-signing-key is new, and repos uninstall deletes one more variable. Declared with ! and the docs.
  • [pattern-inconsistency] internal/repos/trace_keys.go:130 — EnsureTraceSigningKeys passes cfg.Manifest to selectManifestRepos without a nil check, unlike the sibling EnsureManagedConfigDefaults (managed_config_writeback.go:334). The only production caller always supplies a manifest, so this is a consistency gap rather than a reachable bug.
    Remediation: return an error such as manifest is required when cfg.Manifest == nil.

Earlier findings

  • internal/repos/trace_keys.go:105, pattern-inconsistency — resolved: EnsureTraceSigningKeys now defaults a nil progress callback (trace_keys.go:127-129).
  • internal/repos/trace_keys.go:50, api-shape — resolved: TraceKeyPlan.Reason is now a plain string (trace_keys.go:50).
Previous run (2)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImJhY2t3YXJkLWluY29tcGF0aWJsZSIsImZpbGUiOiJpbnRlcm5hbC9yZXBvcy9tYW5pZmVzdF9lZGl0LmdvIiwiaWQiOiJmXzY0YTYyMjAzOWNhNzFiYjQiLCJhY3Rpb25hYmxlIjpmYWxzZSwiZGltZW5zaW9uIjoiY3Jvc3MtcmVwby1jb250cmFjdHMifSx7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJwYXR0ZXJuLWluY29uc2lzdGVuY3kiLCJmaWxlIjoiaW50ZXJuYWwvcmVwb3MvdHJhY2Vfa2V5cy5nbyIsImlkIjoiZl8yZTJhOTA0ZGMyNjU1Nzc0IiwibGluZSI6MTA1LCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJzdHlsZS1jb252ZW50aW9ucyJ9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImFwaS1zaGFwZSIsImZpbGUiOiJpbnRlcm5hbC9yZXBvcy90cmFjZV9rZXlzLmdvIiwiaWQiOiJmXzZhNTNhMjJjNzkxOWY3ZWQiLCJsaW5lIjo1MCwiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6InN0eWxlLWNvbnZlbnRpb25zIn0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoiYmFja3dhcmQtaW5jb21wYXRpYmxlIiwiZmlsZSI6ImludGVybmFsL2NsaS9yZXBvcy5nbyIsImlkIjoiZl9iNjgyOGJkNTZiMDdlYmM2IiwiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6ImNyb3NzLXJlcG8tY29udHJhY3RzIn0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoiYmFja3dhcmQtaW5jb21wYXRpYmxlIiwiZmlsZSI6ImludGVybmFsL3JlcG9zL3RyYWNlX2tleXMuZ28iLCJpZCI6ImZfNWFhNzEyMzcwMjdhZTg0OCIsImFjdGlvbmFibGUiOmZhbHNlLCJkaW1lbnNpb24iOiJjcm9zcy1yZXBvLWNvbnRyYWN0cyJ9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImJyZWFraW5nLWNsaSIsImZpbGUiOiJpbnRlcm5hbC9jbGkvcmVwb3MuZ28iLCJpZCI6ImZfNmYzZGFkNWY3MTU5N2YyMCIsImFjdGlvbmFibGUiOmZhbHNlLCJkaW1lbnNpb24iOiJjcm9zcy1yZXBvLWNvbnRyYWN0cyJ9XX0= -->

Review

Findings

Medium

  • [backward-incompatible] internal/repos/manifest_edit.go — Any install that records a trace key now copies a glob-only repository into its own explicit repos.yaml entry (via carveOutForForge). Later edits to the glob (fullsend_ref pin, kill_switch, roles, allowed_remote_resources) then stop applying to that repository. The PR discloses this and names the glob in the progress line, but a copied entry silently stops following a fleet-wide kill_switch.
    Remediation: Consider copying only the trace_context block, or warning at install time when the glob entry carries fleet-control fields. This is a maintainer design decision.

Low

  • [pattern-inconsistency] internal/repos/trace_keys.go:105 — EnsureTraceSigningKeys does not replace a nil progress callback with a no-op; its siblings (EnsureManagedConfigDefaults, RemoveFromManifest, Uninstall, Converge) do. The only production caller passes a non-nil closure, so this is latent.
    Remediation: Add if progress == nil { progress = func(_, _, _ string) {} } at the top of the function.
  • [api-shape] internal/repos/trace_keys.go:50 — Exported TraceKeyPlan.Reason has the unexported type traceKeyReason (constants also unexported), so code outside repos cannot name or compare it.
    Remediation: Export the type and constants, or declare Reason as string.
  • [backward-incompatible] internal/cli/repos.go — A plain repos install now adds config.trace_context to repos.yaml. v0.37.0–v0.55.0 refuse such a manifest; v0.56.0 accepts it but reports FULLSEND_TRACE_SIGNING_KEY_ID as orphan drift and leaves it on uninstall. Declared via ! and the PR body.
    Remediation: Keep the ! and call it out in the release notes.
  • [backward-incompatible] internal/repos/trace_keys.go — An entry that already declares trace_context by hand gets a new key pair (recovery) on its first install when the secret is missing or the key ID variable is missing or names a retained key; the declared key moves to retained, and a read-only manifest stops the run. Disclosed in the PR body.
    Remediation: Call this out in the release notes.
  • [breaking-cli] internal/cli/repos.go — --rotate-trace-signing-key also provisions the first keys for an existing install while a plain install does not; renaming it after release would itself be breaking. The PR lists this as an open review question.
    Remediation: Settle the flag name and provisioning semantics before release.

Labels: PR changes the repos install CLI flow and Go code.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review fullsend-ai-review Bot added component/install CLI install and app setup go Pull requests that update go code labels Nov 14, 2026
@codecov

codecov Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.27166% with 33 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/repos/trace_keys.go 91.47% 13 Missing and 13 partials ⚠️
internal/cli/repos.go 94.44% 2 Missing and 2 partials ⚠️
internal/repos/manifest_edit.go 80.00% 2 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@waynesun09 waynesun09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Review-only pass: three MEDIUM findings, posted inline below. None of them overlaps the existing qodo or review-agent threads.

Comment thread internal/repos/trace_keys.go Resolved
Comment thread internal/repos/trace_keys.go Resolved
Comment thread internal/repos/converge.go Resolved
….Reason a string

EnsureTraceSigningKeys replaces a nil progress with a no-op, as the
other exported repos functions that take a ProgressFunc do, so a
caller without one no longer panics at the first line it reports.
repos install always passes one.

TraceKeyPlan.Reason is a plain string, so the exported field no
longer has an unexported type. The reason values and the progress
output are unchanged.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
ManifestReadOnly counted a failed open for writing as read-only only
when it was a permission error. A repos.yaml on a read-only file
system, such as a Docker :ro bind mount or a ConfigMap volume, keeps
its write bits and fails that open with EROFS, so it counted as
writable. A fresh GitHub install, which records its trace keys in
repos.yaml, then stopped at that write and converged nothing; repos
uninstall tore the repository down before its manifest write failed;
and repos set failed on its temporary file.

isWriteDenied counts EROFS along with a permission error, so such a
file takes the read-only path of a file without write permission:
install goes ahead without trace keys and names the run that adds
them, uninstall refuses before any teardown, and repos set reports
the read-only manifest.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
…all refuses

One repository's trace signing key refusal stopped the whole repos
install: a malformed FULLSEND_TRACE_SIGNING_KEY_ID, an entry that
contradicts the committed trace_context or the key ID variable, or a
plain run's recovery that a read-only repos.yaml cannot record kept
every other selected repository from converging.

EnsureTraceSigningKeys now returns these as refusals, and repos install
skips each refused repository and lists it as FAILED, as it does one
that needs adoption (fullsend-ai#8511). The trace preflight runs before the
tracking writeback, and the skip list also reaches that writeback, the
safety and infrastructure preflights and convergence, so a refused
repository gets no repos.yaml edit, no key and no commit; its commit
would have replaced the committed trace_context with the entry's. A
read error, or --rotate-trace-signing-key with a read-only repos.yaml,
still stops the run, and that error also names every refusal.

A refusal now says that install wrote nothing for the repository. A
contradicting entry's remedy is to restore its trace_context from the
repos.yaml the last install wrote, not to switch to that file, which
would drop the keys the run recorded for other repositories. The help
text and docs say which trace key problems fail one repository and
which stop the run.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
…annot hold

repos install records a new trace signing key in repos.yaml before
convergence writes its seed. A run that stops a repository before its
key step, at a run-level input check, at one of the repository's
convergence checks or at another convergence error, leaves that key
recorded without its seed, and the next run's recovery retained it. A
repository that kept failing gained one retained key per attempt, and
the commit that finally landed trusted every one of them.

A recovery now replaces the recorded active key instead of retaining
it when the secret cannot hold it: FULLSEND_TRACE_SIGNING_KEY_ID names
a retained key and the committed config does not list the active key,
since a key write deletes the variable before it writes the seed; or
neither the variable nor the secret exists and no block of this
installation is committed. Progress names the key ID it replaces.
Otherwise the key stays retained: while the variable is absent and the
secret exists, or after repos uninstall --uninstall-only of an install
whose commit landed, install cannot tell whether the seed was written.

The rule also replaces a key whose seed was written once but never
committed: after --uninstall-only before the install's first commit
landed, and for a hand-declared trace_context that no secret holds.
The help text and docs state the rule, the failures before the key
step and the growth that remains.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
…ery release that lacks the key ID variable

On an existing install, repos install writes a new trace signing key's
seed and FULLSEND_TRACE_SIGNING_KEY_ID before the commit that adds its
public key to .fullsend/config.yaml is on the default branch: until the
install pull request merges, also when --direct falls back to a pull
request on a protected branch, and after a failed commit until a later
run's commit lands. Until then the default branch's config does not
list the key the secret holds, and a plain run counts the install as
healthy, writes no key and delivers the commit again. The trace context
reference (Writes and recovery, Rotation), the write order in the repos
CLI reference and the convergence comment now say so.

The write order stays. Install cannot publish the key first and switch
later: the seed exists only in the run that generates it, GitHub never
returns a secret's value, and v1 has one secret name.

The compatibility note named v0.56.0 as the release that accepts
trace_context but does not manage FULLSEND_TRACE_SIGNING_KEY_ID.
v0.56.1 does the same, so the note now names the releases from v0.56.0
without this change.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
… when recording its trace keys

Install selects a glob-covered repository with filepath.Match, which is
case-sensitive, and takes the first matching glob in manifest order. The
trace key step then carved the repository's own entry from the first
glob that matches ignoring case. With acme/A* listed before acme/api*,
acme/api, selected through acme/api*, got a copy of acme/A*, so
recording its keys could change its fullsend_ref, roles or kill_switch,
and the proposed-configuration safety check allows that relaxation
because the copied value is declared explicitly.

Glob expansion now records the glob entry that selected each repository,
and the key step copies that entry. A repository selected by name that
expansion does not list, such as a fork, still gets the first glob that
covers it ignoring case, as its selection does. The first-install
tracker default and ResolveConfigWithGlobs still match ignoring case, as
in released versions.

Install resolved the sign-off identities and the --fullsend-binary and
--fullsend-source check before that edit, through the first glob that
matches ignoring case. A repository whose copied entry differs could
then fail at its scaffold commit, after its trace key and repos.yaml
were written, or have those flags refused or silently ignored. Install
now resolves both from the edited manifest, after the manifest edits
and before the repos.yaml write, so a failure still leaves repos.yaml
and the keys unwritten.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
…gn-off identity lookup

A repository whose trace keys install refuses, that needs adoption, or
whose GitLab trigger-account containment failed gets no scaffold
commit, but SignoffForgesFor still counted it. With a token that has no
user identity, such as a GitHub App installation token, such a
repository with signoff enabled stopped the whole run at the identity
lookup, before any other repository converged.

Install now passes the repositories that convergence leaves out, and
SignoffForgesFor leaves out an explicit entry or a concrete filter name
among them. A glob entry still counts, since it may select other
repositories. The --fullsend-binary and --fullsend-source check still
counts a skipped repository: the flags are accepted, the other
repositories converge, and the skipped one is listed as FAILED.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
@dhshah13

Copy link
Copy Markdown
Contributor Author

qodo finding 4 (ADR status claim without pinned evidence): intentional. It's a status annotation on an accepted ADR, which docs/contributing/adrs.md allows; the commit-SHA evidence rule there is for new ADRs. The note links the key lifecycle reference the way the status already links the v1 specification.

@qodo-code-review

Copy link
Copy Markdown

qodo finding 4 (ADR status claim without pinned evidence): intentional. It's a status annotation on an accepted ADR, which docs/contributing/adrs.md allows; the commit-SHA evidence rule there is for new ADRs. The note links the key lifecycle reference the way the status already links the v1 specification.

Thanks for the context. I agree the rule doesn't apply here. docs/contributing/adrs.md (lines 18-32) applies the "claims about current behavior need evidence at a commit SHA" check to new ADRs. It describes minor annotations such as status updates and supersession links as allowed on existing ADRs. ADR 0154 is an existing ADR, and this change adds a status note that links the key lifecycle reference, as the status already links the v1 specification.

I haven't dismissed finding 4 (ADR status claim has no pinned evidence). If you want it closed, reply with an explicit request such as "dismiss finding 4" and I'll mark it with the reason intentional. Only the PR author can do that.

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

🤖 Review · ❌ Terminated · Started 12:54 AM UTC · Ended 1:05 AM UTC

Commit: 91a77e0 · View workflow run →

@dhshah13

Copy link
Copy Markdown
Contributor Author

qodo Dismiss finding 4 as intentional.

@qodo-code-review

Copy link
Copy Markdown

qodo Dismiss finding 4 as intentional.

Dismissed finding 4 ("ADR status claim has no pinned evidence", docs/ADRs/0154-correlate-work-item-and-behaviour-scenario-traces.md:25-28) as intentional. It was the only open finding in the current review, so the review now has no active findings.

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review fullsend-ai-review Bot added the requires-manual-review Review requires human judgment label Nov 17, 2026
@fullsend-ai-review

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 12:54 AM UTC · Completed 1:05 AM UTC

Commit: 91a77e0 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.02

EnsureTraceSigningKeys dereferenced a nil TraceKeysConfig.Manifest,
while its sibling EnsureManagedConfigDefaults returns "manifest is
required". It now returns the same error. repos install, its only
caller, always passes the loaded manifest, so install behaves as
before.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 12:54 PM UTC · Completed 1:02 PM UTC

Commit: 8b64ef2 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.04

@dhshah13
dhshah13 added this pull request to the merge queue Nov 17, 2026
Merged via the queue into fullsend-ai:main with commit 5b90350 Nov 17, 2026
34 checks passed
@dhshah13
dhshah13 deleted the feat/github-trace-key-provisioning branch November 17, 2026 21:11

This branch was successfully deployed

1 active deployment
site-preview — 8b64ef2f Deployed Nov 17, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/install CLI install and app setup go Pull requests that update go code requires-manual-review Review requires human judgment risk/moderate PR risk: moderate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants