@amsterdamdatalabs/adl-agent-control-linux-x64 0.1.46 → 0.1.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/adl +1 -1
- package/bin/reconcile +7 -2
- package/package.json +1 -1
- package/packages/agent-hooks/src/rules/impl/git-branch.ts +1 -1
- package/packages/agent-skills/assets/write-feature/SKILL.md +13 -15
- package/bin/lean-ctx-observe-strip +0 -434
- package/bin/lib/lean-ctx-observe-hooks.sh +0 -634
- package/bin/update-azure-agent-pool +0 -29
- package/packages/agent-hooks/src/hooks/lean-ctx/handler.ts +0 -22
- package/packages/agent-hooks/src/hooks/lean-ctx/index.ts +0 -173
- package/packages/agent-hooks/src/hooks/lean-ctx/mapping.ts +0 -121
- package/packages/agent-hooks/src/hooks/lean-ctx/scope-rewrite.ts +0 -207
- package/packages/agent-hooks/src/lean-ctx/env.ts +0 -123
- package/packages/agent-hooks/src/lean-ctx/mcp.ts +0 -142
- package/packages/agent-hooks/src/rules/impl/adl-build-run-denied.ts +0 -51
- package/packages/agent-hooks/src/rules/impl/adl-session-required.ts +0 -403
- package/packages/agent-hooks/src/rules/impl/tool-lean-ctx-global.ts +0 -594
- package/packages/agent-settings/assets/GLOBAL-AGENTS.md +0 -112
- package/packages/agent-settings/assets/lean-ctx/config.toml +0 -42
- package/packages/agent-settings/assets/lean-ctx/gitignore +0 -10
- package/packages/agent-settings/assets/lean-ctx/layout.toml +0 -7
- package/packages/agent-settings/src/deploy/lean-ctx-deploy.ts +0 -230
- package/packages/agent-settings/src/deploy/lean-ctx-merge.ts +0 -580
- package/packages/agent-skills/assets/adl-mechanics/SKILL.md +0 -38
- package/packages/agent-skills/assets/codebase-design/SKILL.md +0 -98
- package/packages/agent-skills/assets/codebase-design/references/DEEPENING.md +0 -37
- package/packages/agent-skills/assets/codebase-design/references/DESIGN-IT-TWICE.md +0 -44
- package/packages/agent-skills/assets/codebase-design/references/TESTABILITY.md +0 -29
- package/packages/agent-skills/assets/debug-issue/SKILL.md +0 -41
- package/packages/agent-skills/assets/domain-modeling/SKILL.md +0 -86
- package/packages/agent-skills/assets/domain-modeling/references/ADR-FORMAT.md +0 -47
- package/packages/agent-skills/assets/domain-modeling/references/CONTEXT-FORMAT.md +0 -60
- package/packages/agent-skills/assets/implement/SKILL.md +0 -28
- package/packages/agent-skills/assets/review-changes/SKILL.md +0 -45
- package/packages/agent-skills/assets/tdd/SKILL.md +0 -49
- package/packages/agent-skills/assets/tdd/references/mocking.md +0 -59
- package/packages/agent-skills/assets/tdd/references/tests.md +0 -77
- package/packages/agent-skills/assets/testing/SKILL.md +0 -54
- package/packages/agent-skills/assets/testing/references/e2e.md +0 -37
- package/packages/agent-skills/assets/testing/references/integration.md +0 -37
- package/packages/agent-skills/assets/testing/references/unit.md +0 -32
- package/packages/agent-skills/assets/to-feature/SKILL.md +0 -91
- package/packages/agent-skills/assets/to-feature/references/FEATURE-SPEC-TEMPLATE.md +0 -88
- package/packages/agent-skills/assets/to-workitems/SKILL.md +0 -90
- package/packages/agent-skills/assets/to-workitems/references/AZURE-DEVOPS-HIERARCHY.md +0 -121
- package/packages/agent-skills/assets/to-workitems/references/TICKET-TEMPLATES.md +0 -70
- package/packages/azdo/src/workflow-rules-matrix.csv +0 -85
- package/packages/fleet/src/launch-agents.ts +0 -649
- package/packages/repo-controls/assets/GLOBAL-INVARIANTS.md +0 -21
- package/packages/repo-controls/assets/enable-integration-auto-complete.mjs +0 -79
- package/packages/repo-controls/assets/scaffold/docs/notes.md +0 -20
- package/packages/repo-controls/assets/scaffold/plans/GAPS-AND-FINDINGS.md +0 -12
- package/packages/repo-controls/azure-pipelines.yml +0 -274
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/fixtures/docs/notes.md +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/english_only/fixtures/excluded/frontend/mobile/src/i18n/locales/zh-CN/strings.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-ledger-clean/docs/notes.md +0 -17
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-ledger-no-lines/docs/notes.md +0 -13
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/fixtures/semantics-violations/docs/architecture/product/stable-delivery.md +0 -10
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/fixtures/semantics-violations/docs/architecture/product/stable-recommendation.md +0 -12
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/semantics/fixtures/semantics-violations/docs/architecture/product/target-narration.md +0 -10
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-clean/frontend/packages/desktop/src/renderer/solo/item.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-empty-register/frontend/packages/desktop/src/a.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-empty-register/frontend/packages/desktop/src/b.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/fresh/fresh.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub1/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub10/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub11/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub2/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub3/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub4/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub5/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub6/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub7/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub8/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/many/sub9/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/services/i18n/locales/de/common.json +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/renderer/solo/item.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-excluded/frontend/packages/desktop/src/vendored-crate/Cargo.toml +0 -2
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-missing-tree/frontend/packages/desktop/src/renderer/solo/item.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-no-ceilings/frontend/packages/desktop/src/a.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-no-ceilings/frontend/packages/desktop/src/b.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-no-ceilings/frontend/packages/desktop/src/c.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-stale-entry/frontend/packages/desktop/src/renderer/solo/item.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/fresh/fresh.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub1/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub10/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub11/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub2/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub3/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub4/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub5/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub6/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub7/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub8/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/many/sub9/only.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unbaselined/frontend/packages/desktop/src/renderer/solo/item.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/directory_ratchet/fixtures/directory-ratchet-unusable-register/frontend/packages/desktop/src/renderer/solo/item.ts +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/open_work_cap/fixtures/open-work-cap-clean/plans/GAPS-AND-FINDINGS.md +0 -5
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/open_work_cap/fixtures/open-work-cap-clean/plans/features/az601-clean/spec.md +0 -10
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-allowed/agent/crates/enact-providers/src/snapshots/README.md +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-allowed/backend/crates/enact-app/assets/builtin-assistants/avatars/assistant.jpg +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-allowed/backend/crates/enact-assets/assets/logos/tools/coding/tool.png +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-allowed/backend/crates/enact-session/src/backend/codex_init_prompt.md +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-allowed/frontend/mobile/assets/images/icon.png +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-allowed/frontend/packages/desktop/src/renderer/assets/logos/brand/app.png +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-allowed/frontend/packages/desktop/src/renderer/assets/themes/default-theme.png +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-allowed/frontend/public/pwa/icon-192.png +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-allowed/frontend/resources/product.png +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/placement/fixtures/placement-stray/backend/crates/enact-session/src/backend/README.md +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/fixtures/plans-layout-clean/plans/features/az347-test-coverage/spec.md +0 -12
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/fixtures/plans-layout-violation/plans/features/az347-test-coverage/spec.md +0 -12
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/__init__.py +0 -11
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/check.py +0 -62
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/fixtures/migration-filenames/backend/crates/demo/NotAMigration.sql +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/fixtures/migration-filenames/backend/crates/demo/migrations/0001_long_prefix.sql +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/fixtures/migration-filenames/backend/crates/demo/migrations/001_init.sql +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/fixtures/migration-filenames/backend/crates/demo/migrations/002_add_index.sql +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/fixtures/migration-filenames/backend/crates/demo/migrations/003-dashed-slug.sql +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/fixtures/migration-filenames/backend/crates/demo/migrations/004_MixedCase.sql +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/fixtures/migration-filenames/backend/crates/demo/migrations/005_trailing space.sql +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/fixtures/migration-filenames/backend/crates/demo/migrations/01_short_prefix.sql +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/fixtures/migration-filenames/backend/crates/demo/migrations/not-a-migration.sql +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/profile_data/test_check.py +0 -116
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/references/fixtures/link-targets-broken/docs/architecture/product/links.md +0 -20
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/references/fixtures/link-targets-broken/docs/architecture/product/route-target.md +0 -8
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/references/fixtures/link-targets-clean/docs/architecture/product/links.md +0 -20
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/references/fixtures/link-targets-clean/docs/architecture/product/route-target.md +0 -8
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_closed_set/fixtures/.changeset/declared.txt +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/root_markdown_allowlist/fixtures/root-markdown-clean/INDEPENDENT-VERIFICATION.md +0 -3
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/attribute-without-conversion/.gitattributes +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/attribute-without-conversion/large file.bin +0 -3
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/clean/.gitattributes +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/clean/large file.bin +0 -3
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/clean/small.txt +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/missing-filter/large file.bin +0 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/unmatched-extension/.gitattributes +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/lfs/integrity/fixtures/unmatched-extension/payload.dat +0 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/pipeline/__init__.py +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/pipeline/phase_disjoint/__init__.py +0 -12
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/pipeline/phase_disjoint/check.py +0 -129
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/pipeline/phase_disjoint/fixtures/disjoint/gate-registry.yaml +0 -13
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/pipeline/phase_disjoint/fixtures/empty/gate-registry.yaml +0 -7
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/pipeline/phase_disjoint/fixtures/overlapping/gate-registry.yaml +0 -13
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/pipeline/phase_disjoint/test_check.py +0 -109
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/__init__.py +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/changeset_plan/__init__.py +0 -11
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/changeset_plan/check.py +0 -149
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/changeset_plan/fixtures/clean/docs/readme.md +0 -4
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/changeset_plan/fixtures/relevant/VERSION +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/changeset_plan/test_check.py +0 -151
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/__init__.py +0 -11
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/check.py +0 -202
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/fixtures/aligned/.workflows/changesets/package.json +0 -5
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/fixtures/aligned/.workflows/package.json +0 -5
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/fixtures/aligned/CHANGELOG.md +0 -5
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/fixtures/aligned/VERSION +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/fixtures/mismatched/.workflows/changesets/package.json +0 -5
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/fixtures/mismatched/.workflows/package.json +0 -5
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/fixtures/mismatched/CHANGELOG.md +0 -5
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/fixtures/mismatched/VERSION +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/release/version_release/test_check.py +0 -162
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/banned_commands/check.py +0 -103
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/clean/backend/Cargo.lock +0 -7
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/clean/backend/Cargo.toml +0 -4
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/clean/backend/rust-toolchain.toml +0 -3
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/clean/backend/src/main.rs +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/clean/frontend/bun.lock +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/empty-bun-lock/backend/Cargo.lock +0 -7
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/empty-bun-lock/backend/Cargo.toml +0 -4
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/empty-bun-lock/backend/rust-toolchain.toml +0 -3
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/empty-bun-lock/backend/src/main.rs +0 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/repository/lockfile_integrity/fixtures/empty-bun-lock/frontend/bun.lock +0 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/grants-registry.yaml +0 -112
- package/packages/repo-controls/workflows/scripts/release/verify-npm-artifact.ts +0 -119
|
@@ -1 +0,0 @@
|
|
|
1
|
-
placement corpus: an enumerated product path that must stay allowed.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
placement corpus: an enumerated product path that must stay allowed.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
placement corpus: an enumerated product path that must stay allowed.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
placement corpus: an out-of-place path that must be reported.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: feature
|
|
3
|
-
title: "Test coverage"
|
|
4
|
-
status: New
|
|
5
|
-
epic: https://dev.azure.com/org/proj/_workitems/edit/320
|
|
6
|
-
work_item: https://dev.azure.com/org/proj/_workitems/edit/347
|
|
7
|
-
last_update: 2026-09-15T03:20:00Z
|
|
8
|
-
sources:
|
|
9
|
-
- docs/architecture/workflow-automation.md
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Test coverage
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: feature
|
|
3
|
-
title: "Test coverage"
|
|
4
|
-
status: New
|
|
5
|
-
epic: https://dev.azure.com/org/proj/_workitems/edit/320
|
|
6
|
-
work_item: https://dev.azure.com/org/proj/_workitems/edit/999
|
|
7
|
-
last_update: 2026-09-15T03:20:00Z
|
|
8
|
-
sources:
|
|
9
|
-
- docs/architecture/workflow-automation.md
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Test coverage
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"""The `layout.profile-data` gate.
|
|
2
|
-
|
|
3
|
-
A folder rather than a bare module because the ported test carries its own
|
|
4
|
-
fixture corpus beside the check, same as every other gate in this package.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
from __future__ import annotations
|
|
8
|
-
|
|
9
|
-
from .check import ProfileData
|
|
10
|
-
|
|
11
|
-
__all__ = ["ProfileData"]
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"""LAY-010 — every PostgreSQL migration under `ates` is named
|
|
2
|
-
`NNN_slug.sql`.
|
|
3
|
-
|
|
4
|
-
Ported from `compliance_new/checks/layout/profile-data/check.sh`, the
|
|
5
|
-
`migration-filenames` branch retained from the old multi-mode
|
|
6
|
-
`profile-data.sh` after its other three branches were superseded by their own
|
|
7
|
-
engines (see that file's header). It takes no arguments and reads exactly the
|
|
8
|
-
given set (already narrowed by the runner to the row's `engine.scope`,
|
|
9
|
-
`<rust>/crates/**`, i.e. `<rust>/crates/**`); it performs no walk and no
|
|
10
|
-
`git` call of its own.
|
|
11
|
-
|
|
12
|
-
`RULE_ID` in check.sh is the literal `LAY-009`, not this row's own id
|
|
13
|
-
(`LAY-010`) — a pre-existing mismatch in the shell source, not a typo
|
|
14
|
-
introduced here. `compliance_new/AGENTS.md` names this exact failure mode
|
|
15
|
-
("a check that hardcodes [an id] has a second copy of a fact, free to
|
|
16
|
-
disagree with the row") for two OTHER gates; this one has the same shape and
|
|
17
|
-
was not caught. check.sh's own test.sh asserts findings are reported under
|
|
18
|
-
`LAY-009` (`rg -q '^LAY-009 '`), so that is the behaviour ported here —
|
|
19
|
-
faithfully, not silently corrected, since fixing it is a registry/shell-tree
|
|
20
|
-
change outside this port's scope.
|
|
21
|
-
|
|
22
|
-
`*/migrations/*.sql` is a bash `case` pattern, not `engine.scope`: it is the
|
|
23
|
-
rule's own subject-matter test (a migration is defined by living in a
|
|
24
|
-
`migrations/` directory), applied to whatever the given set already narrowed
|
|
25
|
-
to `<rust>/crates/**`. A `.sql` file elsewhere under `<rust>/crates/` is not
|
|
26
|
-
a migration and carries no naming contract, so it is never graded — ported as
|
|
27
|
-
a substring test rather than a glob library, since a repository-relative path
|
|
28
|
-
never carries the leading `/` a `*` prefix of zero length would require.
|
|
29
|
-
"""
|
|
30
|
-
|
|
31
|
-
from __future__ import annotations
|
|
32
|
-
|
|
33
|
-
import re
|
|
34
|
-
from collections.abc import Iterable
|
|
35
|
-
from typing import ClassVar
|
|
36
|
-
|
|
37
|
-
from ....core.check import Check
|
|
38
|
-
from ....core.context import Context, FileSet
|
|
39
|
-
from ....core.finding import Report
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
class ProfileData(Check):
|
|
43
|
-
id: ClassVar[str] = "LAY-010"
|
|
44
|
-
rule: ClassVar[str] = "LAY-009" # see module docstring: verbatim from check.sh
|
|
45
|
-
|
|
46
|
-
NAME: ClassVar[re.Pattern[str]] = re.compile(r"^[0-9]{3}_[a-z0-9_]+\.sql$")
|
|
47
|
-
"""Three digits, an underscore, then a lowercase/digit/underscore slug of
|
|
48
|
-
at least one character — check.sh's `^[0-9]{3}_[a-z0-9_]+\\.sql$`."""
|
|
49
|
-
|
|
50
|
-
def graded(self, ctx: Context, files: FileSet) -> Iterable[Report]:
|
|
51
|
-
for relative in sorted(files):
|
|
52
|
-
if "/migrations/" not in relative or not relative.endswith(".sql"):
|
|
53
|
-
continue # not a migration: no naming contract applies
|
|
54
|
-
base = relative.rsplit("/", 1)[-1]
|
|
55
|
-
if self.NAME.match(base):
|
|
56
|
-
continue
|
|
57
|
-
yield self.report(
|
|
58
|
-
relative,
|
|
59
|
-
f"invalid migration filename: {relative}",
|
|
60
|
-
f"rename {relative} to match NNN_slug.sql "
|
|
61
|
-
"(three dis, underscore, lowercase slug)",
|
|
62
|
-
)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
-- not a migration: lives outside migrations/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
CREATE TABLE oops (id INT);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
CREATE TABLE demo (id INT PRIMARY KEY);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
CREATE INDEX demo_idx ON demo (id);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
CREATE TABLE oops (id INT);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
CREATE TABLE oops (id INT);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
CREATE TABLE oops (id INT);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
CREATE TABLE oops (id INT);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
CREATE TABLE oops (id INT);
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
"""LAY-010 — ported from `compliance_new/checks/layout/profile-data/test.sh`.
|
|
2
|
-
|
|
3
|
-
ONE corpus, one file per malformed shape, ported byte-for-byte from the shell
|
|
4
|
-
fixture (`fixtures/migration-filenames/backend/crates/demo/migrations/` plus
|
|
5
|
-
one `.sql` file that lives outside a `migrations/` directory). Each case below
|
|
6
|
-
hands over a SUBSET of that same corpus, exactly as test.sh's `state_set`
|
|
7
|
-
narrows one given list per case — a lumped fixture would pass as long as ONE
|
|
8
|
-
shape is caught, which is how a loosened pattern hides.
|
|
9
|
-
"""
|
|
10
|
-
|
|
11
|
-
from __future__ import annotations
|
|
12
|
-
|
|
13
|
-
import pathlib
|
|
14
|
-
|
|
15
|
-
import pytest
|
|
16
|
-
|
|
17
|
-
from adl_compliance import runner
|
|
18
|
-
from adl_compliance.checks.layout.profile_data import ProfileData
|
|
19
|
-
from adl_compliance.core.verdict import Outcome
|
|
20
|
-
from adl_compliance.policy.registry import load
|
|
21
|
-
|
|
22
|
-
FIXTURES = pathlib.Path(__file__).parent / "fixtures"
|
|
23
|
-
ROOT = FIXTURES / "migration-filenames"
|
|
24
|
-
ROW = load().by_id("LAY-010")
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
@pytest.fixture(autouse=True)
|
|
28
|
-
def _wired(monkeypatch: pytest.MonkeyPatch) -> None:
|
|
29
|
-
# LAY-010 is not yet in `checks/__init__.py`'s CHECKS tuple — a later step
|
|
30
|
-
# wires this wave of checks into the registry in one shot, to avoid
|
|
31
|
-
# concurrent edits to that shared file. Until then, `runner.lookup` cannot
|
|
32
|
-
# find this row, so the dispatch path (`runner.run`) is exercised here with
|
|
33
|
-
# its one lookup call patched to resolve LAY-010 to this module's class —
|
|
34
|
-
# everything else (scope intersection, verdict decision) runs for real.
|
|
35
|
-
monkeypatch.setattr(runner, "lookup", lambda gate_id: ProfileData)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
DIR = "backend/crates/demo/migrations"
|
|
39
|
-
OUTSIDE = "backend/crates/demo/NotAMigration.sql"
|
|
40
|
-
|
|
41
|
-
INIT = f"{DIR}/001_init.sql"
|
|
42
|
-
ADD_INDEX = f"{DIR}/002_add_index.sql"
|
|
43
|
-
|
|
44
|
-
# The six malformed shapes test.sh's `reject` loop names, each with the
|
|
45
|
-
# reason it names for that shape.
|
|
46
|
-
MALFORMED = (
|
|
47
|
-
("not-a-migration.sql", "a name with no numeric prefix"),
|
|
48
|
-
("01_short_prefix.sql", "a two-digit prefix"),
|
|
49
|
-
("0001_long_prefix.sql", "a four-digit prefix"),
|
|
50
|
-
("003-dashed-slug.sql", "a dashed separator instead of an underscore"),
|
|
51
|
-
("004_MixedCase.sql", "an uppercase slug"),
|
|
52
|
-
("005_trailing space.sql", "a slug containing a space"),
|
|
53
|
-
)
|
|
54
|
-
|
|
55
|
-
CONFORMING = (INIT, ADD_INDEX, OUTSIDE)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
def run(given: tuple[str, ...]) -> object:
|
|
59
|
-
return runner.run(ROW, ROOT, given)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
def test_the_corpus_holds_nine_files() -> None:
|
|
63
|
-
on_disk = tuple(str(p.relative_to(ROOT)) for p in ROOT.rglob("*") if p.is_file())
|
|
64
|
-
assert len(on_disk) == 9, f"the corpus should hold 9 files, got {len(on_disk)}"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
def test_a_conforming_set_passes() -> None:
|
|
68
|
-
verdict = run(CONFORMING)
|
|
69
|
-
assert verdict.outcome is Outcome.CLEAN, verdict.render()
|
|
70
|
-
assert verdict.findings == ()
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
@pytest.mark.parametrize("bad,why", MALFORMED, ids=[b for b, _ in MALFORMED])
|
|
74
|
-
def test_each_malformed_shape_is_rejected(bad: str, why: str) -> None:
|
|
75
|
-
given = (*CONFORMING, f"{DIR}/{bad}")
|
|
76
|
-
verdict = run(given)
|
|
77
|
-
assert verdict.outcome is Outcome.FINDINGS, f"{why} was accepted: {bad}"
|
|
78
|
-
assert len(verdict.findings) == 1
|
|
79
|
-
finding = verdict.findings[0]
|
|
80
|
-
assert finding.rule == "LAY-009" # check.sh's hardcoded RULE_ID; see check.py
|
|
81
|
-
assert finding.path == f"{DIR}/{bad}"
|
|
82
|
-
# The one name in every set that must never be reported: a .sql file
|
|
83
|
-
# outside a migrations/ directory has no naming contract.
|
|
84
|
-
assert OUTSIDE not in {f.path for f in verdict.findings}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
def test_the_whole_corpus_reports_all_six_malformed_names() -> None:
|
|
88
|
-
given = (*CONFORMING, *(f"{DIR}/{bad}" for bad, _ in MALFORMED))
|
|
89
|
-
verdict = run(given)
|
|
90
|
-
assert verdict.outcome is Outcome.FINDINGS
|
|
91
|
-
assert len(verdict.findings) == 6
|
|
92
|
-
assert {f.rule for f in verdict.findings} == {"LAY-009"}
|
|
93
|
-
reported = {f.path for f in verdict.findings}
|
|
94
|
-
assert reported == {f"{DIR}/{bad}" for bad, _ in MALFORMED}
|
|
95
|
-
# Isolation proof (test.sh): every reported path resolves inside the
|
|
96
|
-
# corpus, not some unrelated migrations/ directory elsewhere on disk.
|
|
97
|
-
for finding in verdict.findings:
|
|
98
|
-
assert (ROOT / finding.path).exists()
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
def test_a_sql_file_outside_migrations_is_never_graded() -> None:
|
|
102
|
-
# OUTSIDE alone: a .sql file with no numeric prefix at all, but it does
|
|
103
|
-
# not live under a migrations/ directory, so it carries no naming
|
|
104
|
-
# contract and must stay silent.
|
|
105
|
-
verdict = run((OUTSIDE,))
|
|
106
|
-
assert verdict.outcome is Outcome.CLEAN, verdict.render()
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
def test_no_files_given_is_could_not_run() -> None:
|
|
110
|
-
# The shell gate refuses to run at all with ADL_CHANGED_FILES unset
|
|
111
|
-
# (exit 2). This package has no "unset" state distinct from "empty" — the
|
|
112
|
-
# equivalent, framework-level could-not-run is an empty intersection over
|
|
113
|
-
# the whole visible tree (see core/runner.py's `exhaustive`, and
|
|
114
|
-
# RST-008's identically-shaped test).
|
|
115
|
-
verdict = runner.run(ROW, ROOT, (), exhaustive=True)
|
|
116
|
-
assert verdict.outcome is Outcome.COULD_NOT_RUN
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Links"
|
|
3
|
-
description: "Three links on this page do not resolve"
|
|
4
|
-
document_type: architecture
|
|
5
|
-
status: canonical
|
|
6
|
-
last_update: "2026-07-27T00:00:00Z"
|
|
7
|
-
reason: "fixture"
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
[Sibling](./route-target.md)
|
|
11
|
-
|
|
12
|
-
[Published route](/architecture/product/route-target/)
|
|
13
|
-
|
|
14
|
-
[Completed plan](../../../.plans/c_done/26-07-27-history.md)
|
|
15
|
-
|
|
16
|
-
[Missing](./does-not-exist.md)
|
|
17
|
-
|
|
18
|
-
[Wrong case](../../readme.md)
|
|
19
|
-
|
|
20
|
-
Retired path: `docs/strategy/old-page.md`.
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Links"
|
|
3
|
-
description: "Every link on this page resolves"
|
|
4
|
-
document_type: architecture
|
|
5
|
-
status: canonical
|
|
6
|
-
last_update: "2026-07-27T00:00:00Z"
|
|
7
|
-
reason: "fixture"
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
[Sibling](./route-target.md)
|
|
11
|
-
|
|
12
|
-
[Published route](/architecture/product/route-target/)
|
|
13
|
-
|
|
14
|
-
[Exact case](../../README.md)
|
|
15
|
-
|
|
16
|
-
[Completed plan](../../../.plans/c_done/26-07-27-history.md)
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
[Inside a fence](./does-not-exist.md)
|
|
20
|
-
```
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
root-layout corpus: content under a declared top-level directory.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ordinary
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
|
Binary file
|
package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/pipeline/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"""pipeline."""
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"""The `pipeline.phase-disjoint` gate.
|
|
2
|
-
|
|
3
|
-
A folder rather than a module because this gate GRADES A DOCUMENT, and the
|
|
4
|
-
document belongs beside the check that reads it. `check.py` is the rule;
|
|
5
|
-
anything else in here is what it grades.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
from __future__ import annotations
|
|
9
|
-
|
|
10
|
-
from .check import PhaseDisjoint
|
|
11
|
-
|
|
12
|
-
__all__ = ["PhaseDisjoint"]
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
"""PIP-004 — ported from
|
|
2
|
-
`compliance_new/checks/pipeline/phase-disjoint/check.sh` (rule id `MET-001`).
|
|
3
|
-
|
|
4
|
-
No gate registry row may run in two mutually exclusive phases:
|
|
5
|
-
|
|
6
|
-
1. never both pre-commit and pre-push
|
|
7
|
-
2. never both pr_validation and qua_deploy
|
|
8
|
-
|
|
9
|
-
Entirely `structural`: the registry is a NAMED INPUT (`Check.inputs`, resolved
|
|
10
|
-
by the runner into `ctx.inputs["registry"]`) and every row it grades is inside
|
|
11
|
-
that one document, so there is nothing in `graded` for this gate to read — the
|
|
12
|
-
shell version's own comment says as much: it takes no arguments and holds no
|
|
13
|
-
root variable, and finds the registry structurally from its own position in
|
|
14
|
-
the package.
|
|
15
|
-
|
|
16
|
-
`PhaseRow` and `PhaseRegistry` are `OpenModel`, not `StrictModel`. The real
|
|
17
|
-
`policy/gate-registry.yaml` carries `name`, `domain`, `title`, `severity`,
|
|
18
|
-
`controls`, `engine`, `test`, `grants`, `timeout_ms` on every row — none of
|
|
19
|
-
which is this gate's business. `extra="forbid"` here would make this gate
|
|
20
|
-
refuse to run against the real registry on every single invocation, exactly
|
|
21
|
-
the trap `contracts.transport-boundaries`' own docstring names for its input.
|
|
22
|
-
|
|
23
|
-
A missing registry or one that decodes to zero rows is `CouldNotRun` here,
|
|
24
|
-
exactly as the shell version treats them (exit 2 in both cases) — never a
|
|
25
|
-
`MET-001` finding. The shell script asserts its row count before the verdict
|
|
26
|
-
for the same reason `contracts.transport-boundaries` asserts a non-empty
|
|
27
|
-
`boundaries` list: an empty decode and a clean estate are the same exit code
|
|
28
|
-
otherwise, and the empty one is a broken gate reporting success.
|
|
29
|
-
|
|
30
|
-
**A field this repository's schema does not carry.** Neither the currently
|
|
31
|
-
shipped shell registry (`compliance_new/policy/gate-registry.yaml`) nor this
|
|
32
|
-
package's own (`policy/gate-registry.yaml`, whose `Row` model in
|
|
33
|
-
`policy/registry.py` declares exactly `id · name · domain · title · severity ·
|
|
34
|
-
controls · engine · test · grants · timeout_ms`, closed by K-09) has a single
|
|
35
|
-
row carrying `phases:` today — the scheduling model this gate grades was
|
|
36
|
-
already retired in favour of `engine.scope`-based triggering before this row
|
|
37
|
-
was ported (see `compliance_new/AGENTS.md`, "A phase is not this tree's word",
|
|
38
|
-
and this package's own K-43, "No phase here"). This gate is ported faithfully
|
|
39
|
-
regardless, exactly as `check.sh` specifies it, because retiring a rule is a
|
|
40
|
-
decision for whoever owns the registry row, not something a port silently
|
|
41
|
-
does on its behalf — see this check's own `test_check.py` and this file's
|
|
42
|
-
folder-level notes for what that means for a real run against either registry.
|
|
43
|
-
"""
|
|
44
|
-
|
|
45
|
-
from __future__ import annotations
|
|
46
|
-
|
|
47
|
-
from collections.abc import Iterable
|
|
48
|
-
from typing import Annotated, ClassVar
|
|
49
|
-
|
|
50
|
-
import yaml
|
|
51
|
-
from pydantic import Field, ValidationError
|
|
52
|
-
|
|
53
|
-
from ....core.check import Check
|
|
54
|
-
from ....core.context import Context
|
|
55
|
-
from ....core.errors import CouldNotRun
|
|
56
|
-
from ....core.finding import Report
|
|
57
|
-
from ....core.models import OpenModel
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
class PhaseRow(OpenModel):
|
|
61
|
-
"""One row of the gate registry, projected to just what MET-001 grades."""
|
|
62
|
-
|
|
63
|
-
id: str
|
|
64
|
-
phases: Annotated[tuple[str, ...], Field(strict=False)] = ()
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
class PhaseRegistry(OpenModel):
|
|
68
|
-
"""Open: the real document also carries `schema` at the top level."""
|
|
69
|
-
|
|
70
|
-
rows: Annotated[tuple[PhaseRow, ...], Field(strict=False)] = ()
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
class PhaseDisjoint(Check):
|
|
74
|
-
id: ClassVar[str] = "PIP-004"
|
|
75
|
-
rule: ClassVar[str] = "MET-001"
|
|
76
|
-
|
|
77
|
-
inputs: ClassVar[dict[str, str]] = {
|
|
78
|
-
"registry": "<compliance>/policy/gate-registry.yaml",
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
PRE_COMMIT: ClassVar[str] = "pre-commit"
|
|
82
|
-
PRE_PUSH: ClassVar[str] = "pre-push"
|
|
83
|
-
PR_VALIDATION: ClassVar[str] = "pr_validation"
|
|
84
|
-
QUA_DEPLOY: ClassVar[str] = "qua_deploy"
|
|
85
|
-
|
|
86
|
-
def structural(self, ctx: Context) -> Iterable[Report]:
|
|
87
|
-
registry_path = ctx.inputs["registry"]
|
|
88
|
-
shown = ctx.relative(registry_path)
|
|
89
|
-
|
|
90
|
-
body = self.text(ctx, registry_path)
|
|
91
|
-
if body is None:
|
|
92
|
-
raise CouldNotRun(f"missing input: {shown}")
|
|
93
|
-
|
|
94
|
-
registry = self._load_registry(body, shown)
|
|
95
|
-
if not registry.rows:
|
|
96
|
-
raise CouldNotRun(f"{shown} decoded zero rows")
|
|
97
|
-
|
|
98
|
-
for row in registry.rows:
|
|
99
|
-
phases = set(row.phases)
|
|
100
|
-
|
|
101
|
-
if self.PRE_COMMIT in phases and self.PRE_PUSH in phases:
|
|
102
|
-
yield self.report(
|
|
103
|
-
shown,
|
|
104
|
-
f"{row.id} runs at both {self.PRE_COMMIT} and {self.PRE_PUSH}",
|
|
105
|
-
f"drop one of {self.PRE_COMMIT} or {self.PRE_PUSH} from "
|
|
106
|
-
f"{row.id}'s phases in {shown}",
|
|
107
|
-
)
|
|
108
|
-
|
|
109
|
-
if self.PR_VALIDATION in phases and self.QUA_DEPLOY in phases:
|
|
110
|
-
yield self.report(
|
|
111
|
-
shown,
|
|
112
|
-
f"{row.id} runs at both {self.PR_VALIDATION} and {self.QUA_DEPLOY}",
|
|
113
|
-
f"drop one of {self.PR_VALIDATION} or {self.QUA_DEPLOY} from "
|
|
114
|
-
f"{row.id}'s phases in {shown}",
|
|
115
|
-
)
|
|
116
|
-
|
|
117
|
-
# -------------------------------------------------------------- the registry
|
|
118
|
-
|
|
119
|
-
def _load_registry(self, body: str, shown: str) -> PhaseRegistry:
|
|
120
|
-
try:
|
|
121
|
-
loaded = yaml.safe_load(body)
|
|
122
|
-
except yaml.YAMLError as exc:
|
|
123
|
-
raise CouldNotRun(f"could not read .rows from {shown}: {exc}") from exc
|
|
124
|
-
if not isinstance(loaded, dict):
|
|
125
|
-
raise CouldNotRun(f"could not read .rows from {shown}: not a mapping")
|
|
126
|
-
try:
|
|
127
|
-
return PhaseRegistry.model_validate(loaded)
|
|
128
|
-
except ValidationError as exc:
|
|
129
|
-
raise CouldNotRun(f"could not read .rows from {shown}: {exc}") from exc
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# MET-001 corpus — every row in exactly one phase.
|
|
2
|
-
#
|
|
3
|
-
# All four phases appear, so a gate that mistook any single phase name for an
|
|
4
|
-
# overlap fires here. Nothing in this file may be reported.
|
|
5
|
-
rows:
|
|
6
|
-
- id: OK-01
|
|
7
|
-
phases: [pre-commit]
|
|
8
|
-
- id: OK-02
|
|
9
|
-
phases: [pre-push]
|
|
10
|
-
- id: OK-03
|
|
11
|
-
phases: [pr_validation]
|
|
12
|
-
- id: OK-04
|
|
13
|
-
phases: [qua_deploy]
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# MET-001 corpus — a registry that decodes to zero rows.
|
|
2
|
-
#
|
|
3
|
-
# A gate that reads nothing and a gate that reads a clean estate reach the same
|
|
4
|
-
# verdict unless the row count is asserted first, and the empty one is a broken
|
|
5
|
-
# gate reporting success. This corpus is what makes that distinction testable:
|
|
6
|
-
# the expected result is exit 2 ("could not run"), never exit 0.
|
|
7
|
-
rows: []
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# MET-001 corpus — a registry that violates both exclusion rules.
|
|
2
|
-
#
|
|
3
|
-
# Two rows, two different overlaps, so a gate that checks only the first pair
|
|
4
|
-
# still fails this corpus. OK-01 is here for the same reason the clean corpus
|
|
5
|
-
# exists: without a row that must NOT be reported, "reported BAD-01" and
|
|
6
|
-
# "reported every row it decoded" look identical.
|
|
7
|
-
rows:
|
|
8
|
-
- id: OK-01
|
|
9
|
-
phases: [pre-commit]
|
|
10
|
-
- id: BAD-01
|
|
11
|
-
phases: [pre-commit, pre-push]
|
|
12
|
-
- id: BAD-02
|
|
13
|
-
phases: [pr_validation, qua_deploy]
|