Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
anth-volk
added this pull request to stack #235
October 19, 2026 20:35
anth-volk
force-pushed
the
remove-telemetry-service
branch
from
October 20, 2026 18:20
257e953 to
df4447f
Compare
anth-volk
force-pushed
the
remove-telemetry-service
branch
from
October 20, 2026 18:42
df4447f to
1ceca9f
Compare
anth-volk
marked this pull request as ready for review
October 20, 2026 22:06
anth-volk
marked this pull request as draft
October 20, 2026 22:06
anth-volk
force-pushed
the
remove-telemetry-service
branch
from
October 20, 2026 22:39
1ceca9f to
566a708
Compare
The production dashboard deploy confirmed that the collector read secret exists by running telemetry-service/scripts/check-secrets-exist.sh. It now runs `deploy-dashboard.sh check-read-secret-exists`, which makes the same metadata- only `gcloud secrets describe` call with the same PROJECT_ID and READ_SECRET_NAME from the Production environment, so the deploy no longer depends on telemetry-service/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… repo PolicyEngine/microcosm-collector holds the collector's history, source, tests and deployment. Remove telemetry-service/, its telemetry-service.yml workflow (including the manual redeploy kept for rolling the deploy-source switch back), and the test of that workflow. Point the build monitor's documentation at the collector's repo. New tests require that the directory and workflow stay removed, that no tracked file refers to either, and that no workflow or workflow script here deploys the collector's Cloud Run service or migration job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test asserted that telemetry-service/ did not exist on disk. Switching an existing clone to this branch removes the tracked files but leaves ignored ones, such as .venv/ and __pycache__/, so the test failed there. It now requires that git tracks no file under the directory or at the removed workflow's path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Removing telemetry-service/README.md removed the only description of the dashboard's own settings for reading the collector. Move it into the Build progress documentation: MICROCOSM_TELEMETRY_COLLECTOR_URL, MICROCOSM_TELEMETRY_READ_SECRET_VERSION and MICROCOSM_TELEMETRY_GOOGLE_IDENTITY_PROVIDER, the Vercel OIDC trust, the per-environment secret access, local development with Application Default Credentials, and what the production deploy's read-secret check does and doesn't show. Also correct the claim that the read credential comes from the deployment environment: the server fetches a Secret Manager version itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Production deployments don't take MICROCOSM_TELEMETRY_COLLECTOR_URL from the Vercel project's settings: deploy.yml passes the GitHub Production environment variable of the same name to vercel deploy --env. The read secret version and the identity provider do come from the Vercel project. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The gcloud stub replaced its arguments file on each call, so the tests saw only the last call. A check that first read the secret's value with `gcloud secrets versions access` and then ran the describe call passed test_read_secret_check_reads_only_the_secret_metadata. The stub now appends one record per call, and the tests compare the full list: exactly one `gcloud secrets describe` call when the secret exists or is missing, and no call when a setting is missing. The old script's test on main compared the full list of calls too. Test-only; the script already makes just the describe call. Against a temporary, uncommitted change to the script that adds the value-reading call, this file gave 2 failed (the two tests above); against the committed script, 7 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub Actions expands `${{ vars.NAME }}` to an empty string when the
variable doesn't exist, so a missing TELEMETRY_GCP_PROJECT_ID or
TELEMETRY_READ_SECRET_NAME reaches check-read-secret-exists as an empty
PROJECT_ID or READ_SECRET_NAME. The tests only removed the variable. Run
each case both ways: the check must fail, name the setting, and not call
gcloud.
Test-only; the script already treats an empty value as missing. Against a
temporary, uncommitted change that treats an empty value as present
(`${!name+x}` in place of `${!name-}`), this file gave 2 failed (the two
empty cases: the check exited 0 after calling gcloud); against the
committed script, 9 passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
telemetry-collector-client.ts accepts plain HTTP for both localhost and 127.0.0.1, but the settings table named only localhost. Documentation only, so no red step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anth-volk
force-pushed
the
remove-telemetry-service
branch
from
October 22, 2026 13:15
3509e33 to
df1e4ba
Compare
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.
Fixes #232
Merge requirements (all three must hold)
This PR stays a draft until they do.
f59d94c). Its release commit's Push run deploys staging, then production..github/workflows/telemetry-service.yml, including the confirmed manual redeploy that calibration-diagnostics#233 kept as the rollback path. Merging it before deployment from microcosm-collector is proven would leave no fallback.main(re-reviewed at566a708; its fixes are listed under "Re-review (2026-10-20)"), and the review's findings are resolved.After merging, do the cleanup under "Cleanup after merging" below.
Summary
PolicyEngine/microcosm-collector now holds the collector's history, source, tests and deployment. This PR:
.github/workflows/deploy.ymlconfirmed that the collector read secret exists by runningtelemetry-service/scripts/check-secrets-exist.sh "$READ_SECRET_NAME". It now runsbash .github/scripts/deploy-dashboard.sh check-read-secret-exists, a new command in the script that already holds the deploy's shell logic. It makes the same metadata-only call,gcloud secrets describe "$READ_SECRET_NAME" --project "$PROJECT_ID" --format=none, with the samePROJECT_IDandREAD_SECRET_NAMEfrom theProductionenvironment, after the same Google Cloud authentication. It never reads the secret's value, and it fails before anything is deployed if the secret or either setting is missing.telemetry-service/(35 files, includingscripts/require-collector-push-runs-finished.shfrom calibration-diagnostics#233 and the two test files calibration-diagnostics#219 added),.github/workflows/telemetry-service.yml(including the manual redeploy that calibration-diagnostics#233 kept for rollback), andfrontend/tests/test_telemetry_service_workflow.py, which tested that workflow.telemetry-service/README.mdheld the only description of the dashboard's own settings for it.docs/build-monitor.mdnow has it, in "Reading the collector":MICROCOSM_TELEMETRY_COLLECTOR_URL,MICROCOSM_TELEMETRY_READ_SECRET_VERSIONandMICROCOSM_TELEMETRY_GOOGLE_IDENTITY_PROVIDERand where production and preview get each one, the Vercel OIDC trust, the per-environment secret access, local development with Application Default Credentials, and what the production deploy's read-secret check does and doesn't show. It also corrects the claim that the read credential comes from the deployment environment: the server fetches a Secret Manager version itself.docs/build-monitor.mdat microcosm-collector.A search of every tracked file finds no other reference to
telemetry-service/,telemetry-service.yml,telemetry_collectororcheck-secrets-exist. New tests keep it that way. The test that the directory is gone asksgit ls-files, because switching an existing clone to this branch leaves ignored files such as.venv/and__pycache__/intelemetry-service/.Deployment configuration
Merging deploys the dashboard to production through
deploy.yml, as every merge does, and that deployment runs the new check first.PROJECT_ID←vars.TELEMETRY_GCP_PROJECT_IDProductionenvironment variableenv:→check-read-secret-existsREAD_SECRET_NAME←vars.TELEMETRY_READ_SECRET_NAMEProductionenvironment variable naming a Google Secret Manager secretenv:→gcloud secrets describeTELEMETRY_GCP_WIF_PROVIDER,TELEMETRY_GCP_DEPLOY_SERVICE_ACCOUNTProductionenvironment secretsgoogle-github-actions/authin the step beforegithub/calibration-diagnosticsassertion.repository=='PolicyEngine/calibration-diagnostics'roles/iam.workloadIdentityUser. Keep both until the follow-up belowMICROCOSM_TELEMETRY_COLLECTOR_URL(documented, not changed)Productionenvironment variabledeploy.ymlstepenv:→deploy-dashboard.sh deploy-frontend→vercel deploy --env→ server runtimeMICROCOSM_TELEMETRY_READ_SECRET_VERSION,MICROCOSM_TELEMETRY_GOOGLE_IDENTITY_PROVIDER(documented, not changed)telemetry-collector-client.ts,secret-manager.tsNo variable or secret is added. After this merges, the
stagingenvironment and mostTELEMETRY_*variables inProductionare unused; see "Cleanup after merging".Merging
a45aaf1, a merge commit). GitHub then moved this PR ontomainand rebased it, so it needs no base change. Its diff againstmainis its own changes: six changed files and 37 removals.telemetry-service/files.mainCI or "Deploy production" run is unfinished, because a merge cancels an unfinishedmainCI run and skips its deployment.Rebase onto
main(2026-10-20, 2026-10-22)This branch and calibration-diagnostics#233 were rebased onto
mainat19be8dcon 2026-10-20, with no change to their own content. This branch's five commits were replayed onto #233's new headfc660c4(0d69ba5→e102651,9ccbfd8→79436b6,d015902→036550e,82101cd→9f07958,257e953→df4447f), and the merge commit269c3fa, which only brought #233 in, was dropped.mainnow includes calibration-diagnostics#219, so79436b6keeps the deletions where #233 or #219 changed a file, and also deletesscripts/require-collector-push-runs-finished.sh(previously deleted by269c3fa) and #219's newtests/event_schedules.pyandtests/test_incremental_batch_apply.py;git ls-files telemetry-serviceprints nothing. Every file this PR adds or changes has the same added and removed text as before. The three test files: 28 passed (mainadded 6 tests totest_deploy_workflow.py); shellcheck and actionlint report no findings.After #233 and #245 merged, GitHub rebased the branch again, onto
1548d93(#245's merge commit):e102651→ab182c7,79436b6→3b9581a,036550e→ca540f0,9f07958→30f9fec,df4447f→566a708. Each new commit has the same subject, files and number of added and removed lines as the one it replaced.On 2026-10-22 the branch was rebased onto
mainat2f7cdcd(the merge of calibration-diagnostics#261, after #247, #248, #250, #256 and #258) and force-pushed with a lease on3509e33:ab182c7→80a2d1c,3b9581a→3386b7c,ca540f0→5cceb49,30f9fec→bd8759e,566a708→ff40071,2822d17→9587f51,8b29c49→d4cb573,3509e33→df1e4ba. The "Tests" and "Re-review" tables below name the new commits.telemetry-service/uv.lock, which this PR deletes and which Stop trusting the compromised eMudhra CA certificates #256 (a2dbad6) changed to upgrade certifi from 2026.7.22 to 2026.10.19. The deletion is kept: nothing onmainuses the file, and the collector deploys from microcosm-collector. microcosm-collector'suv.lockstill pins certifi 2026.7.22 (read 2026-10-22), so that upgrade has not reached the collector; that is a follow-up in microcosm-collector, not in this PR.git range-diff: seven of the eight commits have identical patches.3386b7cdiffers only in the deleted text oftelemetry-service/uv.lock, which now contains Stop trusting the compromised eMudhra CA certificates #256's certifi lines.deploy.yml(the trigger accepts only CI runs formain, and the concurrency group moved to the deploy job) and added tests totest_deploy_workflow.py. This PR's hunks in both files applied without conflict and did not change. The "Check collector read secret exists" step is still in thedeployjob (environment: Production), after the same Google Cloud authentication and before "Deploy Modal backend", and reads onlyPROJECT_IDandREAD_SECRET_NAMEfrom theProductionvariablesTELEMETRY_GCP_PROJECT_IDandTELEMETRY_READ_SECRET_NAME(both present; names listed 2026-10-22).main: still this PR's own changes, six changed files and 37 removals, with the same added and removed lines in each of the six files as before.git ls-files telemetry-serviceprints nothing, and no tracked file refers totelemetry-service,check-secrets-existorrequire-collector-push-runs-finished.test_collector_lives_in_its_own_repo.py3 passed,test_deploy_script.py9 passed,test_deploy_workflow.py27 passed (39 in all; Start production deploy runs only for main CI runs #261 added 9 test cases to the last file). shellcheck 0.11.0 ondeploy-dashboard.shand actionlint 1.7.12 ondeploy.ymlreport no findings;ruff checkpasses on the three files.ruff format --checkreports only code thatmainwrote intest_deploy_workflow.py, including Start production deploy runs only for main CI runs #261's new lines;main's copy fails the same check. No TypeScript file changed, sobun run lint(the TypeScript type check) was not run.Tests
80a2d1cCheck the collector read secret from the dashboard deploy scripttest_deploy_script.py::test_read_secret_check_reads_only_the_secret_metadata,test_missing_read_secret_stops_deployment,test_read_secret_check_requires_its_configuration[PROJECT_ID]and[READ_SECRET_NAME](each runs the script with agcloudstub that records its arguments), andtest_deploy_workflow.py::test_dashboard_checks_read_secret_metadata_before_deploymenttest_deploy_script.pyandtest_deploy_workflow.py: 19 passed. shellcheck 0.11.0 ondeploy-dashboard.shand actionlint 1.7.12 ondeploy.yml: no findings3386b7cRemove telemetry-service/test_collector_lives_in_its_own_repo.py::test_the_collector_directory_and_its_workflow_are_removed,test_no_tracked_file_refers_to_the_removed_collector_directory,test_no_workflow_or_workflow_script_deploys_the_collector5cceb49Check the removed collector directory with git ls-filestest_the_collector_directory_and_its_workflow_are_removed, in a clone switched from #233's branch that kept the ignoredtelemetry-service/.venv/and__pycache__/foldersbd8759eDocument how the dashboard reads the collector;ff40071Say where production gets the collector addresstest_no_tracked_file_refers_to_the_removed_collector_directoryalso covers the new text)After each commit, its test files passed again. Ruff lint passes on the three test files, and Ruff format on this PR's changes to them (since the rebase onto
1548d93,ruff format --checkalso reports tests thatmainadded totest_deploy_workflow.py;main's copy fails the same check); shellcheck 0.11.0 ondeploy-dashboard.shand actionlint 1.7.12 ondeploy.ymlwere re-run with no findings. Locally I ran only these test files. CI runs the rest.Re-review (2026-10-20)
Re-reviewed at
566a708. The earlier review's findings are still fixed after both rebases, nothing in the repo refers to the removed files, andcheck-read-secret-existsmakes the same call as the old script. The review found no bug in the script, the workflow or the documentation; it found two gaps in the new tests and one imprecise sentence. Fixes:9587f51Record every gcloud call in the read-secret check testsgcloudstub replaced its record on each call, so a check that also read the value (gcloud secrets versions access latest …before the describe call) passed all four read-secret tests. With the stub recording every call: 2 failed against that temporary, uncommitted change to the script (test_read_secret_check_reads_only_the_secret_metadata,test_missing_read_secret_stops_deployment: the first recorded call wassecrets versions access)test_deploy_script.py: 7 passed against the committed script. Test-only: the script already makes just the describe calld4cb573Test the read-secret check with empty settingsvars.NAME, and the tests only removed the variable. 2 failed against a temporary, uncommitted change that treats an empty value as present ([empty-PROJECT_ID],[empty-READ_SECRET_NAME]: the check exited 0 after callinggcloud)test_deploy_script.py: 9 passed. Test-only: the script already treats an empty value as missingdf1e4baSay that the collector address may also use HTTP on 127.0.0.1After the three commits:
test_collector_lives_in_its_own_repo.py,test_deploy_script.pyandtest_deploy_workflow.pygave 30 passed;ruff checkpasses on them; shellcheck 0.11.0 ondeploy-dashboard.shand actionlint 1.7.12 ondeploy.ymlreport no findings. Locally I ran only these files.Cleanup after merging (manual; not done by this PR)
All three are needed once this PR has merged and deployed.
stagingenvironment: onlytelemetry-service.ymlused it. It still holds the secretsMICROCOSM_TELEMETRY_COLLECTOR_READ_TOKENandTELEMETRY_HF_QUALIFICATION_TOKEN(names listed 2026-10-20). The plan records both as deleted under its stage 0.1 (2026-10-19), but that deletion removed other copies, not these; they go with the environment. Stage 0.1 also said to rotate the read token if this copy is current, which can't be checked from GitHub because it doesn't return secret values.Production, delete theTELEMETRY_*variables other thanTELEMETRY_GCP_PROJECT_IDandTELEMETRY_READ_SECRET_NAME. Keep bothTELEMETRY_GCP_*secrets andMICROCOSM_TELEMETRY_COLLECTOR_URL.deploy.ymlauthenticates as the service account inTELEMETRY_GCP_DEPLOY_SERVICE_ACCOUNT, which is the collector's deploy service account, only to rungcloud secrets describeon the read secret. That account has project-levelroles/run.adminand a role that can create Cloud SQL backups (found in review; not re-read for this update).roles/secretmanager.vieweron the read secret (the secret, not the project).github/calibration-diagnosticsprovider'sprincipalSet://…/attribute.repository/PolicyEngine/calibration-diagnosticsuse it (roles/iam.workloadIdentityUseron the new account).ProductionsecretTELEMETRY_GCP_DEPLOY_SERVICE_ACCOUNTto the new account, and check that the next dashboard deploy's "Check collector read secret exists" step passes.roles/iam.workloadIdentityUserbinding from the collector's deploy service account, so this repo can no longer act as it.🤖 Generated with Claude Code