Skip to content

fix: admit active deployment targets and scope downstream commands - #287

Merged
pranems merged 2 commits into
masterfrom
vprane/scimserver/containers-active-deployment-preflight-20261124
Nov 24, 2026
Merged

pranems merged 2 commits into
masterfrom
vprane/scimserver/containers-active-deployment-preflight-20261124

Conversation

@pranems

@pranems pranems commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Summary

Correct offline active-deployment admission and scoped downstream commands without changing application behavior, retention policy or deployment gates.

  • Resolve current dev and canary by role; reject stale cached identities, foreign targets and unsupported cross-subscription mirrors.
  • Anonymous GHCR provides no implicit ACR mirror. Require an explicitly approved existing mirror in active dev's subscription when deployment needs ACR.
  • Pin actual ACR reads/writes and pruning commands to admitted subscriptions, without az account set.
  • Validate even explicitly supplied dev hostnames against authoritative scoped ingress before fixture capture.
  • Suppress direct reads in DryRun while preserving import/digest/reviewed-master/shipping/approval gates and serving/rollback safeguards.
  • Only six scripts/contract/documentation paths changed; product version and all tracked locks are unchanged.

Acceptance boundary: Parent accepted the offline correction, not actual approved mirror existence, permissions, runtime matrix, shipping or Azure admission. Historical registry listing found zero visible ACR in the authorized active subscription, not global absence. Existing a7ef000 six-mode qualification is historical and is not relabeled for this tip. Separate unpublished logging/performance work is untouched.

Linked Defect / Plan Reference

  • DELIVERY_PLAN.md defect ID: N/A - bounded current-estate admission follow-up.
  • Audit doc reference: docs/CONTAINER_RUNTIME_REMOVAL_READINESS.md and docs/DEPLOYMENT_INFRASTRUCTURE_AND_FORM_FACTORS.md; local append-only evidence is test-results/active-deployment-admission/WIRING_FOLLOWUP_EVIDENCE_AND_RCA.md.
  • ADR (if applicable): N/A - existing estate resolver and pipeline-local admission pattern retained.

TDD Process

  • RED test written first; observed it fail for the expected reason
  • GREEN: minimal implementation that turns the test green
  • Refactor (if any) keeps the test green
  • Permanent regression guard added (where applicable - see existing patterns in api/src/security/)

Inherited RED and semantic RED receipts remain retained, including incomplete fixture attempts. Final focused contracts assert actual scoped argument values, authoritative ingress admission, no-command DryRun and pruning scope; 168 actual assertions pass. Parent independently reviewed both source deltas and verified six native command lifecycles with 18 planned/started/closed entries, nonempty receipts and native exits 0.

Feature / Bug-Fix Commit Checklist (standing rule)

Every behavioral change must include all that apply. Tick or strike through with N/A + reason.

  • Unit Tests - service-level and controller-level coverage of the new behavior. N/A to unchanged application services/controllers; existing PowerShell deployment contract strengthened to 168 passing assertions.
  • E2E Tests - end-to-end spec under api/test/e2e/ exercising the feature through HTTP. N/A to offline orchestration correction; ordinary hook owns existing application HTTP checks, not actual cloud admission.
  • Live Integration Tests - new section in scripts/live-test.ps1 runnable against local + Docker + Azure. N/A - live/cloud/container operations prohibited in this bounded publication scope; real mirror/permission/deployment checks remain pending.
  • Feature Documentation - dedicated doc in docs/ with architecture, RFC references, Mermaid diagrams, test coverage. Existing canonical infrastructure/readiness guidance updated; no new feature or diagram needed.
  • INDEX.md Update - add the new doc reference to docs/INDEX.md. N/A - existing indexed guides updated, no new tracked feature document.
  • CHANGELOG.md Update - [Unreleased] entry with full test counts and feature summary. N/A - pipeline-only correction, not product release or app behavior change.
  • Session & Context Updates - Session_starter.md and docs/CONTEXT_INSTRUCTIONS.md. Session starter updated; context/version counts are unchanged because no new runtime qualification or release is claimed.
  • Version Management - bump api/package.json (and any other version refs) when behavior changed. N/A - no application behavior change, manifests and locks untouched.
  • Response Contract Tests - API responses contain ONLY documented fields (key allowlist assertion at unit + E2E + live). N/A - no API response changes; offline command value/dispatch contracts are the relevant guard.

Validation Output

Source: b4f76afb07e8032440aefed7d8e5bfedefea9371
Final focused native commands: 6/6 exit 0; 18 lifecycle entries
Pipeline contracts: 168 actual assertions PASS
Estate registry: 15 cases PASS
Unchanged revision retention: 8 cases PASS
PowerShell parsers: 3 PASS; existing literal JSON: 1 PASS
Infrastructure audit: PASS; freshness: 29 docs PASS
Ordinary Validate pre-push: 32/32 gates PASS, native push exit 0
API unit: 220 suites / 6274 tests PASS
Reduced in-memory HTTP: 120 suites / 2519 tests PASS; 4 suites / 45 tests skipped
Web Vitest: 126 files / 1664 tests PASS
API lint: 0 errors, 507 warnings
Web TypeScript: 66 existing errors within unchanged 96-error gate
Product version/locks: unchanged

Exact completed focused commands, all exit 0 (inherited verified receipts, not manually duplicated during consolidation):

  1. pwsh -NoProfile -File test-results\active-deployment-admission\offline-static-checks.ps1
  2. pwsh -NoProfile -File scripts\test\dev-deployment-pipeline.contract.ps1
  3. pwsh -NoProfile -File scripts\test-scim-estates.ps1
  4. pwsh -NoProfile -File scripts\test-prune-revisions.ps1
  5. pwsh -NoProfile -File scripts\audit-deployment-doc.ps1
  6. pwsh -NoProfile -File scripts\audit-doc-freshness.ps1

Aggregate: pwsh -NoProfile -File test-results\active-deployment-admission\run-offline-validation.ps1 -RunName wiring-complete, exit 0.

Receipt metadata: test-results/active-deployment-admission/wiring-completion.json. Final journal: wiring-complete-journal.jsonl, SHA-256 11BE16E231CC16B6FF9CA01F8C73433977B74898A89412348D0AAAC4268309AA. Parent verification UTC 2026-11-24T15:12:27.5562250Z. Original fd80099 bundle remains unchanged. These ignored local receipts are not downloadable PR artifacts and hashes alone are not completeness.

Consolidation commands: failed push attempt 1 (native exit 1, missing TypeScript); failed attempt 2 (push exit 1, API build exit 2, missing generated Prisma client). Dependencies restored only after those missing-tooling failures using npm ci --no-audit --no-fund in owned api/web/root, each exit 0 through existing approved proxy with all tracked locks byte-identical. npm run prisma:generate, exit 0, generated the missing owned client without database operations. The ordinary unchanged hook retry verifies resolution; failures remain in local receipt/RCA scope.

Final exact push: $env:PREPUSH_MODE='Validate'; git push --set-upstream origin HEAD:refs/heads/vprane/scimserver/containers-active-deployment-preflight-20261124, native exit 0, 32 normal gates PASS in 1,318.8 seconds. Hook owns npm run build, npm run lint, npx tsc --noEmit, npm test (API and web), npm run test:e2e -- --maxWorkers=2 --testPathIgnorePatterns 'endpoint-scoped-logs.e2e-spec.ts' --testPathIgnorePatterns 'log-config.e2e-spec.ts', npx prisma generate and the existing static/contract gates. All gate exits are 0 under their unchanged rules; web TypeScript's 66 errors are tolerated by the existing gate, not a claim of zero-error compilation. Successful log: test-results/active-deployment-admission/consolidation-push-attempt-3.txt, SHA-256 4E7AF5C7380214ADA04E19FADB61CCB7C068DE09A40935B0310C39BF3EF5010F.

Post-hook snapshot file was content-equivalent to HEAD: both Git-normalized blobs ba99a782f3e5cbde38d184d517d8fb0ca8a5e2f2. Preserved generated bytes and restored only that line-ending rewrite; no snapshot assertion or baseline changed. Owned worktree is clean. Local HEAD, upstream and exact remote destination all equal the full source SHA above.

Not run: actual cloud mirror/permissions, full dev pipeline, new runtime/backend/live matrix, Playwright, benchmarks or deployment. No manual shipping dispatch. Existing CI exclusions remain unchanged and are not represented as complete full HTTP qualification.

Standing Rules Acknowledgment

  • No em-dash (Unicode U+2014) anywhere in the diff. Verified via Select-String -Pattern ([char]0x2014).
  • No git commit --amend on history that has been pushed.
  • No new credentials, tokens, or secrets committed to source. Forbidden patterns regression spec at api/src/security/forbidden-source-patterns.spec.ts will catch known anti-patterns.
  • Migrations are additive-only (expand-contract for column changes). Migration linter at api/src/scripts/lint-migrations.ts enforces this. N/A - no migration/schema change.

Destructive Migration Override (skip if not applicable)

  • This PR contains a NEW destructive Prisma migration (DROP TABLE/COLUMN, ALTER COLUMN ... TYPE, RENAME, INSERT ... SELECT FROM)
  • I have set ALLOW_DESTRUCTIVE_MIGRATION=1 in the CI environment for this PR
  • Justification (required if box above is ticked):
    <!-- Why this destructive change is necessary, what the rollback path is, and which release window it ships in -->
    N/A - no migration changes or override.
    

Reviewer Hint

Diff areas worth special attention from the reviewer:

  • scripts/dev-deployment-pipeline.ps1: admission, all actual ACR argument sites, explicit-host authoritative ingress, current canary and DryRun direct reads.
  • scripts/prune-revisions.ps1: scoped list/deactivate/post-check, no cached account selection, unchanged retention/serving safeguards.
  • scripts/test/dev-deployment-pipeline.contract.ps1: value/dispatch assertions and negative controls rather than presence-only checks.
  • Canonical guides: distinguish offline source acceptance from pending actual active-subscription approved mirror and permission checks.

Test/gate improvement: applied in the source's semantic value/dispatch negative controls; consolidation accepts existing fail-closed prerequisite/ownership gates and records restoration rather than bypassing them.
Design disposition: accepted - cohesive pipeline-local admission and existing pruning/resolver seams, no speculative abstraction or production changes during consolidation.

PR-triggered CI may publish nonshipping test/sha images and buildcache, smoke them in Linux CI and scan their digest. It does not execute Azure deployment. The Azure update text is summary output only. Merge-to-master does not invoke shipping: build-and-push.yml is v-tag/manual only; publish-ghcr.yml is manual only. No merge, auto-merge, deployment or manual workflow dispatch is authorized here.

Parent source review is not independent GitHub approval. Current branch protection has strict required checks validate, build-and-push, Analyze (javascript-typescript) and no configured required-review count; ordinary code-owner/platform review status will be reported, not bypassed or self-approved.

Prashant Rane (ALLYIS INC) and others added 2 commits November 24, 2026 08:56
Require an explicit approved ACR mirror when active dev declares anonymous GHCR. Preserve existing mirror/import/digest, shipping/master and approval gates. Verify cached tenant/subscription and dev target before side effects; keep DryRun prerequisite checks offline.

Offline validation: 116 deployment contract assertions, 15 estate cases, parser and documentation audits pass. Real mirror availability, permissions and full deployment remain pending. Design disposition: accepted cohesive local admission; self-improvement applied semantic identity and DryRun non-dispatch controls.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Scope ACR mirror commands to the approved active dev subscription and canary ingress to its current estate. Validate explicit dev hostnames against scoped authoritative ingress before HTTP capture. Keep DryRun tag inspection offline. Pass admitted scope to pruning and pin its commands without switching accounts; preserve retention and all deployment approval gates.

Offline validation: 168 contract assertions, 15 estate cases, 8 revision retention cases, three parsers and documentation audits pass. Real mirror availability, permissions and full deployment remain pending. Design disposition accepted; executable command/hostname/no-switch controls applied. Preserve original and follow-up failed receipts separately.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@pranems pranems left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consolidation self-review only, not independent approval. Exact source tip b4f76af: ordinary unchanged Validate hook passed all 32 gates; API units 6274/220, reduced in-memory HTTP 2519 pass with 45 existing skips, web 1664/126. Parent separately accepted the offline source correction and verified six focused command lifecycles/18 journal entries, 168 contract assertions, 15 estate and 8 unchanged retention cases. Source outcome and evidence boundaries are documented in the template body. Actual approved mirror existence, active-subscription permissions, new-source runtime qualification and deployment remain pending. PR CI and ordinary independent/platform review are separate admission requirements. No merge or deployment is authorized in this publication scope.

@pranems

pranems commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

Review-policy clarification after exact-tip CI completion: the repository has no configured required independent-approval count, and its existing documented consolidation precedent (including PR #286) records owner COMMENTED self-review. This branch has recorded self-review plus completed parent source review; the two parent findings were corrected at exact b4f76af. All required checks and all six reported contexts now succeed on that tip. The attempted additional Copilot review returned HTTP422 NO_QUOTA_REMAINING; it is not claimed as completed or as independent approval. That optional service limitation does not change or waive the repository gates. Proceeding only through normal exact-head merge, without admin override, bypass or deployment; actual approved mirror/permissions and full release qualification remain pending.

@pranems
pranems merged commit dbe17d3 into master Nov 24, 2026
6 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