Skip to content

fix: reconcile stale deployment inventory - #104

Closed
zoeyrose wants to merge 6 commits into
mainfrom
fix/obsolete-metaserver-credential-inventory
Closed

zoeyrose wants to merge 6 commits into
mainfrom
fix/obsolete-metaserver-credential-inventory

Conversation

@zoeyrose

@zoeyrose zoeyrose commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Summary

Reconcile the manual-settings inventory with reviewed producer workflows and live settings so that read-only verification passes its credential, Pages and environment checks again. The pull request does three things:

  • removes two retired metaserver credential entries;
  • corrects Classic's Pages activation marker;
  • records the organization owner as the required reviewer on the metaserver production environment, by owner decision of 2026-11-14.

It does not by itself restore Project synchronization. See Limitations / follow-up.

Implementation / behavior

  • Remove retired ATRINIK_PRODUCTION_BUILDS_READ_TOKEN and ATRINIK_PRODUCTION_WRITER_FENCE_POLICY inventory entries. Preserve the current delivery-resource read token, deployment credentials, protected-branch policies, recovery key, and verification guards.
  • Update Classic's Pages activation marker to the official actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 (v5.0.1), already merged through Classic PR #547. The old marker incorrectly classified the existing Actions site as awaiting activation.
  • Update documentation and test fixtures; explicitly reject the obsolete credential and select DEV test records by identity.
  • Record [{"type": "User", "id": 3865595}] as required_reviewers on the atrinik/metaserver-worker production environment. The live environment already has this reviewer; the inventory said none.
  • bin/validate: replace the blanket empty-reviewer rule. A record for atrinik/metaserver-worker production must carry repository ID 1324297032 and exactly the owner as reviewer. Every other recorded environment must still have no reviewers.
  • bin/verify-manual-settings: project the recorded reviewers to {type, id} before the string comparison. Without this, the recorded key order caused false drift against the live projection.
  • Tests reject missing, different, team, extra, duplicate and malformed production reviewers, the owner on any other environment, and production under another repository name or ID. Verifier fixtures cover live reviewer drift in both directions.
  • README.md: the owner is the single required reviewer on metaserver production. Her dispatch of the exact reviewed inputs and her approval of the pending deployment together form the approval boundary.

Validation

At head 6329066, with ATRINIK_VALIDATION_TODAY=2026-11-08:

  • bin/validate passes, and all 29 tests/*.sh pass.
  • ShellCheck on the four changed scripts, bash -n and git diff --check are clean.
  • Read-only bin/verify-manual-settings against live GitHub exits 0, including KEEP atrinik/metaserver-worker environment production metadata. At the previous head 9f9c520 the same run stops with required reviewer drift for atrinik/metaserver-worker production.
  • Mutation checks: loosening or removing the reviewer rule, or dropping its repository, repository-ID or environment pin, makes the validator tests fail. Reverting the verifier projection, or the fixture's reviewer, makes the verifier tests fail.
  • The read-only publisher plan is unchanged by this pull request: eight proposed operations, none applied.
  • The consumer was checked read-only: scripts/production-promotion.mjs in atrinik/metaserver-worker accepts a well-formed required_reviewers rule and requires one approved review for the environment, so recording the reviewer matches it.

On the real date, 2026-11-14, bin/validate exits 1 on main and on this branch alike, because three lifecycle records have passed their deadlines (next section). Hosted Policy validation therefore fails on this head for a reason this pull request did not introduce.

Earlier validation of the first three changes, at 9f9c520 on 2026-11-01, is recorded in the self-review receipts below.

Limitations / follow-up

Draft until the expired lifecycle records are renewed. Each needs a real owner action first; the dates must not be moved forward without it.

Record Deadline Needs
ATRINIK_SETTINGS_TOKEN (atrinik/github-settings) rotate_by 2026-11-08 A new classic PAT stored in the secret. A scheduled run on 2026-11-08 logged Bad credentials (HTTP 401), so the old token is dead; later runs stop earlier, at validation.
DEPENDENCY_UPDATE_APP_PRIVATE_KEY (atrinik/classic) rotate_by 2026-11-09 A rotated App private key, and the owner's check of the App's selected repositories.
Cloudflare Workers and Pages App review_by 2026-11-13 The owner's review of the installation's selected repositories.
  • The settings token's recorded scopes are admin:org, project and repo. The verifier also reads the private linux-build package record, which may need read:packages. This is unconfirmed, because no run with the settings token has reached that step.
  • Owner decisions of 2026-11-14: keep the production reviewer (done here), and let the scheduled Project synchronization resume under its existing policy. A read-only plan on 2026-11-14 held 73 changes: 31 items added, 32 statuses set and 10 issue types set, with nothing removed.
  • After merge and a working token, Synchronize project and Project synchronization health should recover. Governance drift audit will keep failing on governance drift that this pull request does not address; the eight publisher operations need separate authorization.
  • prevent_self_review (live: false) and administrator bypass are not recorded or verified for this environment.
  • This change performs no settings apply, Project synchronization, workflow dispatch, secret provisioning, or live Pages change.

Intent brief

Goal: remove stale manual-settings inventory blockers using current reviewed source and live name and configuration evidence, so that read-only verification can pass and Project synchronization can resume once the settings credential is renewed.

Decisions: keep the live production reviewer and record it, as the smallest exception to the empty-reviewer rule; pin it by repository name, repository ID and environment; leave every other environment's rule unchanged.

Constraints: preserve all security and verification controls; record lifecycle dates only after the owner's real rotation or review.

Excluded: broader ruleset and default drift, runtime repair, live operations, and Project reconciliation. These need separate coordination or owner approval.

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@zoeyrose

Copy link
Copy Markdown
Member Author

Reviewed exact head 2b12b45d087d7eb59ffc06bac130eff694fd454c against main 9e5aa0cbeda41ac55307f712df8a42f6729a790e with fresh-context independent Astra reviewers.

The full review inspected all six changed files, affected credential schema and name-only verifier paths, current metaserver source, security/failure behavior, tests and documentation. Retained delivery read credentials, protected branches, recovery key and API failure checks are preserved. No workflow or Project mutation code changed.

Finding: P2 at tests/validate-manual-credentials.sh:259, stale numeric index made a negative DEV test a no-op. Fixed in 2b12b45d087d7eb59ffc06bac130eff694fd454c by selecting the exact development resource-read credential. Fresh-context delta review examined this fix and affected validator semantics with no further findings; full credential tests, selector identity assertion, bash syntax and diff check passed.

Validation so far: bin/validate, all shell syntax checks, targeted full credential test and git diff --check pass. Full policy suite remains running. Exact-head CI CodeQL and Dependency review pass; Policy validation remains running. Read-only bin/publish completed exit 0 and its unrelated drift was inspected, never applied. Read-only bin/verify-manual-settings accepts both retained credentials in both environments, then fails on existing unrelated Classic Pages activation/source drift. No credential values read or recorded.

Keep this PR draft pending owner review of the downstream Project plan (43 planned changes at preparation). No apply, Project synchronization, workflow dispatch, secret provisioning, live policy changes or merge authorized/performed.

@zoeyrose zoeyrose changed the title fix: remove obsolete metaserver credential inventory fix: reconcile stale deployment inventory Oct 31, 2026
@zoeyrose

Copy link
Copy Markdown
Member Author

Reviewed exact head d0075b8b4919b75be7c59d5c83c4b04a73169fdb against main 9e5aa0cbeda41ac55307f712df8a42f6729a790e.

Fresh-context independent Astra review covered the full initial six-file diff, affected schema/verifier, current metaserver workflows, security/failure behavior and docs/tests. One P2 stale numeric test index was fixed in 2b12b45d087d7eb59ffc06bac130eff694fd454c; fresh-context delta review confirmed exact DEV/name selection restores meaningful negative coverage, with no other findings.

A further fresh-context independent Astra review covered the final Pages delta 2b12b45..d0075b8, its four affected files, validator/verifier and failure fixtures, and supplied current Classic executable deployment step. No findings. Official actions/deploy-pages v5.0.1 resolves to the same full SHA as merged Classic PR547/current source. Existing identity, HTTPS, environment, source and credential controls remain intact; documentation separates metadata verification from deployment success.

Validation: all local tests/*.sh passed (the two changed Pages tests also passed in a separate final run); bin/validate, all shell syntax checks and git diff --check passed. Earlier exact-head hosted ShellCheck, CodeQL and Dependency review passed; final-head CI is pending. Full read-only publisher plan completed exit 0 and was inspected; unrelated policy drift remains unapplied. Final live manual verification passes retained credentials and the corrected Classic Pages check, then stops at pre-existing production required-reviewer drift. Live bin/audit cannot complete with this host's old gh (--slurp unsupported). These are reported limitations, not waived checks.

Keep draft pending owner review of the downstream Project plan (43 planned changes at preparation) and production environment drift. No apply, synchronization, workflow dispatch, secret provisioning, live policy/Pages changes or merge performed.

@zoeyrose

Copy link
Copy Markdown
Member Author

Reviewed exact head 23574220baab667cc403655b4b2f1971ab8277ff against main 9e5aa0cbeda41ac55307f712df8a42f6729a790e.

Fresh-context independent Astra review covered the full initial six-file diff, affected schema/verifier, current metaserver workflows, security/failure behavior and docs/tests. One P2 stale numeric test index was fixed in 2b12b45d087d7eb59ffc06bac130eff694fd454c; fresh-context delta review confirmed exact DEV/name selection restores meaningful negative coverage, with no other findings.

A further fresh-context independent Astra review covered the final Pages delta 2b12b45..d0075b8, its four affected files, validator/verifier and failure fixtures, and supplied current Classic executable deployment step. No findings. Official actions/deploy-pages v5.0.1 resolves to the same full SHA as merged Classic PR547/current source. Existing identity, HTTPS, environment, source and credential controls remain intact; documentation separates metadata verification from deployment success.

Validation: all local tests/*.sh passed (the two changed Pages tests also passed in a separate final run); bin/validate, all shell syntax checks and git diff --check passed. Fresh live checks on final head 2357422 pass: Policy validation (including ShellCheck and the full policy tests), CodeQL and all three analyses, Dependency review, and Conventional PR title. Full read-only publisher plan completed exit 0 and was inspected; unrelated policy drift remains unapplied. Final live manual verification passes retained credentials and the corrected Classic Pages check, then stops at pre-existing production required-reviewer drift. The initial audit attempt encountered the old host gh (--slurp unsupported); rerunning read-only bin/audit with an existing verified modern gh completed and reported 48 broader governance drift findings. No drift was applied. These are reported limitations, not waived checks.

Keep draft pending owner review of the downstream Project plan (43 planned changes at preparation) and production environment drift. No apply, synchronization, workflow dispatch, secret provisioning, live policy/Pages changes or merge performed.

Mechanical documentation delta d0075b8..2357422 independently reviewed: production count sentence now correctly says seven secrets and one variable, verified against config. No findings; diff check passed. No executable/configuration changes in this final delta, so prior local suite and live-plan evidence retain validity.

@zoeyrose

zoeyrose commented Nov 1, 2026

Copy link
Copy Markdown
Member Author

Reviewed exact head 9f9c5205a4610237619dbe264b57150723115622, cleanly merging main aaae055d390bb1e2ed8ab31aac7e4d57bdd85bdc (PR105), with previous reviewed PR head 23574220baab667cc403655b4b2f1971ab8277ff.

Fresh-context independent GPT-6.1 Sol high review examined the prior-head delta, complete six-file net cleanup, affected credential/environment/Pages validation, and semantic interaction with PR105 ruleset normalization, preservation, concurrency fences, audit integration, tests and documentation. No P0–P3 findings. There were no conflict resolutions or new authored code beyond the clean merge.

Validation: all 29 tests/*.sh pass; bin/validate, shell syntax and git diff --check pass. ShellCheck 0.11.0 and actionlint 1.7.12 pass in the cached immutable linux-build 1.18.0 container with read-only checkout and no network. Full read-only bin/publish plan completed and was inspected: eight proposed operations, none applied. Fresh read-only manual verification passes retained credentials and Classic Pages, then correctly fails on known production required-reviewer mismatch. Exact-head hosted checks are being verified separately.

Keep draft pending both owner decisions: adopt or remove the existing production zoeyrose reviewer, and review/authorize the 43 planned Project mutations and automatic synchronization resumption upon merge. No live apply, Project sync, secret provisioning, policy mutation, workflow dispatch or merge performed.

The live atrinik/metaserver-worker production environment requires the
organization owner (User 3865595) as reviewer, while the inventory
recorded an empty set, so bin/verify-manual-settings reported reviewer
drift. By owner decision of 2026-11-14 the live reviewer stays and is
recorded here.

- config: record [{type: User, id: 3865595}] for that environment.
- bin/validate: replace the blanket empty-reviewer rule. A record for
  atrinik/metaserver-worker production must carry repository ID
  1324297032 and exactly the owner as reviewer; every other recorded
  environment must have none. Removing the record altogether is still
  caught only by the exact-inventory test, as for every environment.
- bin/verify-manual-settings: project the recorded reviewers to
  {type, id} before the string comparison so config key order cannot
  cause false drift.
- tests: reject missing, different, Team, extra, duplicate and
  malformed production reviewers, the owner on any other environment,
  and production under another repository name or ID; cover live
  production reviewer drift in both directions.
- README: the owner is the single required reviewer; her dispatch and
  her approval of the pending deployment form the approval boundary.

prevent_self_review and administrator bypass remain unrecorded and
unverified for these environments.

Co-Authored-By: Claude <noreply@anthropic.com>
@zoeyrose

Copy link
Copy Markdown
Member Author

Closing without merging, by owner decision of 2026-11-14.

The settings automation that this pull request was repairing is being retired rather than repaired. Its credential, ATRINIK_SETTINGS_TOKEN, expired on 2026-11-08 and will not be replaced: the scheduled jobs do not justify a standing credential with organization-owner-level access. The three scheduled workflows that used it (Synchronize project, Project synchronization health and Governance drift audit) were disabled today.

What is left as it was:

  • The branch stays, including the reviewed commit 6329066 that records the production reviewer, in case any of it is reused.
  • No live setting was changed by this pull request. The required reviewer on the metaserver production environment stays in place.
  • main still fails bin/validate on three lifecycle records that are past their deadlines. Closing this does not change that.

A simpler approach to keeping the organization's settings will be proposed separately.

@zoeyrose zoeyrose closed this Nov 14, 2026
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