Repository navigation
Remove the unused observability contract and stale identity token field - #85
Merged
Merged
Conversation
Delete the parts of lib/observability that only tests read: the Cloudflare health-check spec builder, the offline lifecycle-pair auditor, the durable action reliability summarizer, CAIL_LOG_ENVIRONMENTS, the contract version, and the collection, fleetProjection, access, syntheticMonitor, serviceLevels, dashboardViews and telemetryQuality sections. The service, health and action values that logging, health, publish and the agent read stay. Drop the token field from resolveRequestIdentity's verified result. No production code read it; model calls forward the separately verified gateway leg. Update docs/cail-log-alignment.md to describe the remaining contract. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Follow-up to the open question in #84. It removes the parts of
lib/observability/contract.tsandlib/observability/action-attempt.tsthat only tests read, removes thetokenfield fromresolveRequestIdentity's verified result, and updatesdocs/cail-log-alignment.mdto match. It adds no behavior.Removed
contract.tscreateCloudflareHealthCheckSpecandCloudflareHealthCheckSpecauditTelemetryLifecyclePairs,TelemetryQualityIssue,TelemetryRecord,TelemetryValueCAIL_LOG_ENVIRONMENTS(parseCailLogEnvironmentstays; it has its ownswitch)OBSERVABILITY_CONTRACT_VERSION, plus theschemaVersionandproductIdfieldscollection,fleetProjection,access,syntheticMonitor,serviceLevels,dashboardViewsandtelemetryQualitysectionsSiteStudioActiontype, and the imports of cail-log Analytics Engine constants, action-attempt schema constants, the fleet point cap, andzodthat only those sections usedaction-attempt.tssummarizeDurableActionReliability,ActionReliabilitySummary,basisPointscail-identity.tstokenin{ status: "verified" }. The doc comment said model calls forward it. That has been false since e1cf4b6:authMiddlewareforwards only the separately verified gateway leg (cailGatewayJwt).Tests
observability-contract.test.ts: "pins privacy, access, export, and conservative monitor defaults" and "audits lifecycle projection gaps without deciding product success". Removed theCAIL_LOG_ENVIRONMENTS, contract-version andtelemetryQualityassertions from the tests that remain.action-attempt-contract.test.ts: the twosummarizeDurableActionReliabilitytests and their fixtures.cail-identity.test.ts: "returns the verified identity and exact canonical token". Withouttoken, it repeated "accepts a valid canonical identity token", which already asserts the full verified result withtoEqual.Reader map
git grep -wover the repository (packages/,scripts/,.github/,packages/app/scripts/), plusrgover every local CAIL repository under~/Apps/cail, including the systems map and cail-log:createCloudflareHealthCheckSpecauditTelemetryLifecyclePairssummarizeDurableActionReliabilityCAIL_LOG_ENVIRONMENTSOBSERVABILITY_CONTRACT_VERSION,.schemaVersion,.productId.collection,.fleetProjection,.access,.syntheticMonitor,.serviceLevels,.dashboardViews,.telemetryQualityRequestIdentityResolution.tokensession.tsreads onlyidentity, andscripts/local-browser-worker.tsreads onlyidentity.subject.No other CAIL repository references any of these symbols. Nothing publishes the contract as an artifact for the fleet dashboard to read.
Kept, and why
OBSERVABILITY_CONTRACT.services.app(name,version,healthPath,healthMarker).lib/logging.tsreadsLOG_SERVICEandLOG_RELEASEfrom it, androutes/health.tsreads the path and marker.OBSERVABILITY_CONTRACT.actions(route,method). Read bylib/logging.ts(action admitted/terminal events),routes/publish.tsandagents/site-builder.ts(admission route check).healthResponseand the version-metadata validation. The deploy job's "Probe production readiness" step in.github/workflows/ci.ymlchecks/api/healthforstatus == "ok",product_id == "site-studio"andversion_id == $EXPECTED_VERSION_ID.scripts/live-product-e2e.mjschecksstatusandproduct_id. The three health and version-metadata tests stay.parseCailLogEnvironment,serviceUnavailableResponse,PRODUCT_ID. Read bylogging.tsandhealth.ts.action-attempt.ts: schema versions, retention, routes, record types and terminal validators.agents/site-builder.tsand the/api/projects/{id}/observabilityread use them. TheisActionAttemptTerminalConsistenttests stay.fleet-projection.ts, includingSITE_STUDIO_MAX_FLEET_POINTS_PER_INVOCATION. The runtime boundary sink uses it.Docs
docs/cail-log-alignment.md:contract.tsholds and that monitors, thresholds, SLOs and saved queries are operator configuration outside the repository.site-builder.ts, which returns every retained attempt with a nullableterminal_at.No other doc described the removed code. README, AGENTS.md,
security-and-recovery.mdandworkers-builds.mdwere grepped.Validation
observability-contract,action-attempt-contract,cail-identity,fleet-projection,session,boundary-logging,routes/agents): 7 files, 106 tests pass.bun run check: rc=0. That covers lint, app vitest (32 files, 745 tests, down from 750), thechat-runtime-contractandpreview-route-contractboundary scripts,tsc --noEmit, the frontend check (224 tests) and the frontend build. Nopackages/app/scripts/*contract*.mjsscript reads observability code. The only release probe that touches it is the CI health probe described above, and its response shape has not changed.git diff --check: clean.🤖 Generated with Claude Code