Track adapterOS retired Access bypass state#24
Merged
Conversation
Behavior: mirror the live beta, developers, and ops adapterOS Access apps after the retired-host repair by recording bypass policies at precedence 1 and preserving the prior gated policies at precedence 2. Add desired-state specs for the three bypass policies so cfctl diff can see the repaired state instead of treating those policies as unmanaged. Reasoning: the aos-web release repaired live Access so retired hosts can reach the Pages worker redirects. Capturing that state in cfctl prevents a future desired-state sync from drifting the apps back behind the old gate or losing the bypass precedence. Runtime logic: add the missing desired-state sync body helper and compare Access app policy references by the desired id/name fields, while preserving boolean false values during subset comparison. This makes existing app specs diffable without proposing false updates. Risks: source-state and diff-runtime changes only; no Cloudflare mutation is performed by this commit. The remaining unmanaged Access policies are outside the adapterOS retired-host scope. Proof: jq validates the changed JSON specs; ./scripts/verify_static_contract.sh passes; CF_TOKEN_LANE=global ./cfctl diff access.app reports 3 specs, 3 in sync, 0 drift; CF_TOKEN_LANE=global ./cfctl diff access.policy reports 3 specs, 3 in sync, 0 drift.
Owner
Author
|
@codex Please review the desired-state runtime helper change in lib/runtime/desired_state.sh, especially the policy-reference comparison and boolean false preservation, against the Access app/policy state specs added in this PR. The intent is for read-only diff to report no-op when live policies include full policy bodies but desired app state intentionally carries only id/precedence references. |
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.
Issues closed
None in this repository. This is the cfctl desired-state follow-up for the adapterOS retired-host Access repair completed during the aos-web v2 release closeout.
Behavior changed
beta.adapteros.com,developers.adapteros.com, andops.adapteros.com.1and the prior gated policy at precedence2for each app.Bypass retired Pages redirectAccess policies so they are no longer unmanaged by cfctl state.falsevalues.Proof commands and results
jq . state/access.app/beta-adapteros.json state/access.app/ops-adapteros.json state/access.app/developers-adapteros.json state/access.policy/aos-retired-beta-bypass.json state/access.policy/aos-retired-developers-bypass.json state/access.policy/aos-retired-ops-bypass.json >/dev/null- passed../scripts/verify_static_contract.sh- passed.CF_TOKEN_LANE=global ./cfctl diff access.app | jq '{ok, summary, statuses: [.result.desired_specs[] | {spec_path, status, differing_fields, proposed_operation}]}'- passed;spec_count: 3,in_sync_count: 3,drift_count: 0, all proposed operationsnoop.CF_TOKEN_LANE=global ./cfctl diff access.policy | jq '{ok, summary, statuses: [.result.desired_specs[] | {spec_path, status, differing_fields, proposed_operation}]}'- passed;spec_count: 3,in_sync_count: 3,drift_count: 0, all proposed operationsnoop.field_diffs: []and matching policy ids/precedence.Risk / caveats
falsevalues or Access apppoliciesreferences. The proof above checks both affected Access surfaces.Deployment impact
No product deploy is required. Merging this updates cfctl source-of-truth state and keeps future desired-state diffs from proposing a rollback of the retired-host bypass repair.
Review focus
lib/runtime/desired_state.sh: confirm the subset comparison should preserve booleanfalseand compare policy references by desired keys.state/access.app/*adapteros*.json: confirm bypass precedence1and previous gated policy precedence2are intentional.state/access.policy/aos-retired-*-bypass.json: confirm only the three retired-host bypass policies are pulled into state.Confidence