Skip to content

auth otel config - #336

Merged
davidabram merged 9 commits into
claude-hook-trace-propagationfrom
auth-otel-config
Oct 27, 2026
Merged

davidabram merged 9 commits into
claude-hook-trace-propagationfrom
auth-otel-config

Conversation

@davidabram

Copy link
Copy Markdown
Member

No description provided.

@davidabram
davidabram added this pull request to stack #337 October 20, 2026 12:04
davidabram and others added 9 commits October 21, 2026 09:45
Define the new auth.mode and telemetry.enabled sections in the generated Pkl schema and parse them into per-layer file configuration with provenance. Add schema-pointer validation coverage and document the accepted keys while leaving runtime policy resolution for the follow-up work.

Plan: auth-telemetry-policy-config
Task: T01

Co-authored-by: SCE <sce@crocoder.dev>
Resolve auth and telemetry settings across user and repository config layers so repository files cannot grant access or telemetry without user consent. Most-restrictive auth resolution, deterministic telemetry states and contradiction warnings, degraded-config shutdown, and projected runtime policy exposure now share one resolver; durable context documents the contract and decision.

Plan: `auth-telemetry-policy-config`
Task: `T02`

Co-authored-by: SCE <sce@crocoder.dev>
Expose resolved auth mode and telemetry consent state in `config show` text and JSON, including provenance, disabled reasons, and the Claude settings compatibility note. Preserve `config validate`'s existing field shape while surfacing policy warnings, and document the reporting contract.

Plan: auth-telemetry-policy-config (T03)

Co-authored-by: SCE <sce@crocoder.dev>
Prevent managed telemetry startup from probing readiness or credentials when the effective policy disables telemetry, and report that state as a passing doctor result with stable text and JSON output. Add command, doctor, and Claude-hook regressions, and document the enforced policy boundary.

Plan: auth-telemetry-policy-config T04

Co-authored-by: SCE <sce@crocoder.dev>
Prevent the hidden telemetry header helper from reading readiness or resolving repository credentials when the effective policy disables telemetry. Resolve the auth runtime config from the working directory, make readiness probing lazy, and cover disabled and invalid-config behavior in unit and multiprocess tests.

Plan: auth-telemetry-policy-config (T05)

Co-authored-by: SCE <sce@crocoder.dev>
Gate login and whoami on the resolved auth mode before credential storage, returning stable `auth.disabled_by_config` diagnostics. Make telemetry provisioning honor `telemetry.enabled` and report disabled status, while mandatory whoami rejects unauthenticated users and logout remains ungated.

Plan: auth-telemetry-policy-config (T06)

Co-authored-by: SCE <sce@crocoder.dev>
Reject sync before Agent Trace storage or credential access when auth is disabled, and map the rejection to the stable auth.disabled_by_config error. Gate post-commit auto-sync and doctor readiness on the same background-cloud policy while preserving optional and mandatory behavior.

Share the deciding config-file mapping across auth commands and sync, and record a debug event when configured auto-sync is suppressed. Update the CLI context and T07 completion evidence for the policy boundary.

Plan: auth-telemetry-policy-config (T07)

Co-authored-by: SCE <sce@crocoder.dev>
Prevent `sce setup` from modifying user-level Claude settings when telemetry is not enabled by resolving the layered access policy for the setup repository. Preserve the existing enabled install behavior and document the fixed skip output and unchanged-settings contract.

Plan: auth-telemetry-policy-config (T08)

Co-authored-by: SCE <sce@crocoder.dev>
Load global and repository policy files alongside an explicitly selected config so explicit runs cannot bypass global or repository auth restrictions or telemetry opt-outs while retaining explicit ordinary-key overrides. Discover repository configuration at the enclosing Git root and use the shared root for repository identity and all policy consumers.

Add coverage and update the access-policy contracts for nested repositories, worktrees, explicit precedence, and degraded discovered configuration.

Plan: auth-telemetry-policy-config (T08)

Co-authored-by: SCE <sce@crocoder.dev>
@davidabram
davidabram merged commit 85eb8f6 into main Oct 27, 2026
11 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.

1 participant