Repository navigation
feat(api): send the run environment on every v2 reconcile - #597
Open
theCodeDrift wants to merge 2 commits into
Open
theCodeDrift wants to merge 2 commits into
theCodeDrift wants to merge 2 commits into
Conversation
Reconcile now carries environment: { ci, provider? }, from the CI detection telemetry already performs. The service records when a repository last reconciled from CI, for the dashboard's CI indicator; verdicts are unchanged. Declared locally until the vendored v2 schema is re-vendored.
Member
Author
|
@claude /review |
Contributor
|
Claude finished @theCodeDrift's task in 1m 9s —— View job Review mode: incremental — read 0 prior review thread(s) before reviewing.
AssessmentThis is a clean, well-scoped change. Highlights:
Minor (non-blocking) observations
No correctness, security, or performance issues found. Nothing else stood out in the diff. |
Member
Author
— AI Coding Agent |
This branch has not been 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.
Every
POST /cli/api/v2/reconcilenow carriesenvironment: { ci, provider? }, so the service can record when a repository last reconciled from CI. That is what the dashboard's "CI set up" indicator (taskless/taskless#334, item 3) waits on. Verdicts, entitlements and output are unchanged; the field never affects them.What it sends
{ ci: false }.{ ci: true, provider: "github-actions" }(alsogitlab-ci,bitbucket-pipelines, …).{ ci: true }. The[unknown]/[none]telemetry sentinels are never sent; they exist to keep aggregates countable, and on the wire they would be values the service has to know to ignore.The detection is the one telemetry already uses (
isContinuousIntegration,resolveCiProvider), so the two can never disagree about whether a run was CI. Only the spelling differs: the published schema's example is hyphenated, while telemetry keeps the underscores its dashboards group by.It is attached inside
reconcileRulesrather than by each caller, so neither current call site (check's plan,rules recover) nor a future one can send a reconcile without it.Why the vendored schema was not regenerated
The live
/cli/api/v2/__schemaalready publishesenvironmentas optional, withadditionalProperties: falseon{ ci?, provider? }. Regenerating to pick it up would also vendor three error codes the service has added since (github_forbidden,github_unavailable,cli_upgrade_required), and the exhaustive code lists insrc/api/v2.tsthen fail typecheck in seven places until each client decides how to handle them. That deserves its own change, so the field is declared as a local intersection on the request type with a comment saying it can be deleted once the schema is re-vendored.Verified
github-actions) and off it (ci: false), with the environment stubbed both ways so it does not depend on where the suite runs. It fails with the client change removed.resolveRunEnvironment: local,CI=falsebeside a provider marker, recognised providers, and an unrecognised one.pnpm typecheck,pnpm lint, and the full CLI suite (2839 passed, 10 skipped).Refs #596