@amsterdamdatalabs/adl-agent-control-linux-x64 0.1.37 → 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 +2 -2
- package/bin/reconcile +10 -13
- package/bin/setup +15 -15
- package/package.json +1 -1
- package/packages/agent-hooks/package.json +1 -1
- package/packages/agent-hooks/src/main.ts +23 -2
- package/packages/agent-hooks/src/rules/impl/adl-mcp-cli.ts +12 -8
- package/packages/agent-hooks/src/rules/impl/adl-run-required.ts +11 -5
- package/packages/agent-hooks/src/rules/impl/adl-workitem-role.ts +18 -5
- package/packages/agent-hooks/src/rules/impl/agent-tamper-protection.ts +30 -26
- package/packages/agent-hooks/src/rules/impl/git-branch.ts +1 -1
- package/packages/agent-hooks/src/rules/impl/git-target.ts +5 -0
- package/packages/agent-hooks/src/rules/impl/mcp-tool.ts +3 -1
- package/packages/agent-hooks/src/rules/impl/tool-frontend.ts +230 -11
- package/packages/agent-hooks/src/rules/shell/git-identity.ts +1 -1
- package/packages/agent-hooks/src/rules/shell/invocation.ts +14 -2
- package/packages/agent-hooks/src/rules/shell/protected-carriers.ts +10 -11
- package/packages/agent-settings/assets/TARUN-GLOBAL-AGENTS-INSTRUCTIONS.md +2 -2
- package/packages/agent-settings/package.json +1 -1
- package/packages/agent-settings/src/deploy/agents-deploy.ts +19 -1
- package/packages/agent-settings/src/deploy/index.ts +1 -0
- package/packages/agent-skills/assets/agent-search-tool-audit/SKILL.md +4 -6
- package/packages/agent-skills/assets/finalize-feature/SKILL.md +3 -3
- package/packages/agent-skills/assets/implement-feature/SKILL.md +17 -20
- package/packages/agent-skills/assets/implement-feature/references/briefs.md +3 -3
- package/packages/agent-skills/assets/implement-item/SKILL.md +3 -3
- package/packages/agent-skills/assets/mechanics/SKILL.md +1 -1
- package/packages/agent-skills/assets/plan-feature/SKILL.md +10 -10
- package/packages/agent-skills/assets/prepare-promotion/SKILL.md +3 -4
- package/packages/agent-skills/assets/report-bug/SKILL.md +2 -2
- package/packages/agent-skills/assets/review-change/SKILL.md +3 -3
- package/packages/agent-skills/assets/review-plan/SKILL.md +4 -4
- package/packages/agent-skills/assets/triage-workitems/SKILL.md +4 -4
- package/packages/agent-skills/assets/validate-design/SKILL.md +6 -12
- package/packages/agent-skills/assets/verify-item/SKILL.md +5 -5
- package/packages/agent-skills/assets/wayfinder/SKILL.md +1 -1
- package/packages/agent-skills/assets/workitems-process/SKILL.md +19 -21
- package/packages/agent-skills/assets/workitems-process/references/ado-and-git.md +36 -3
- package/packages/agent-skills/assets/workitems-process/references/evidence.md +4 -4
- package/packages/agent-skills/assets/write-feature/SKILL.md +15 -18
- package/packages/agent-skills/dist/deploy.d.ts +45 -0
- package/packages/agent-skills/dist/deploy.d.ts.map +1 -1
- package/packages/agent-skills/dist/deploy.js +167 -3
- package/packages/agent-skills/dist/deploy.js.map +1 -1
- package/packages/agent-skills/dist/index.d.ts +1 -1
- package/packages/agent-skills/dist/index.d.ts.map +1 -1
- package/packages/agent-skills/dist/index.js +1 -1
- package/packages/agent-skills/dist/index.js.map +1 -1
- package/packages/agent-skills/package.json +1 -1
- package/packages/agent-skills/src/deploy.ts +241 -3
- package/packages/agent-skills/src/index.ts +10 -1
- package/packages/azdo/README.md +13 -4
- package/packages/azdo/bunfig.toml +6 -0
- package/packages/azdo/package.json +1 -1
- package/packages/azdo/src/azdo-attachments.ts +2 -1
- package/packages/azdo/src/azdo-pr.ts +182 -6
- package/packages/azdo/src/azdo-wit.ts +290 -41
- package/packages/azdo/src/cli.ts +79 -12
- package/packages/azdo/src/lib/client.ts +88 -16
- package/packages/azdo/src/mcp-server.ts +75 -10
- package/packages/azdo/src/tool-dispatch.ts +61 -26
- package/packages/fleet/src/install-adl-package.ts +4 -3
- package/packages/repo-controls/assets/promote.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-untyped/docs/research/no-type.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-untyped/docs/research/typed-experiment.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-untyped/docs/research/typed-research.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/extra-key.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/extra-keys.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-created.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-description.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-last-update.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-status.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-title.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/optional-keys.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/research-ok.md +1 -1
- package/packages/repo-controls/package.json +1 -1
- package/packages/repo-controls/src/config.ts +21 -2
- package/packages/repo-controls/src/doctor.ts +9 -14
- package/packages/repo-controls/src/findings-ratchet.ts +12 -0
- package/packages/repo-controls/src/hook.ts +61 -4
- 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
|
-
1.2.3
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1.2.3
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
"""REL-004 — VERSION, CHANGELOG.md, and the two workflow manifests, aligned.
|
|
2
|
-
|
|
3
|
-
Not driven through `verdict_for`/`runner.run`: this wave's checks are ported in
|
|
4
|
-
parallel and none may touch `checks/__init__.py`'s shared `CHECKS` tuple, so
|
|
5
|
-
`lookup(row.id)` cannot find this class yet. `Context`/`FileSet` are built
|
|
6
|
-
directly and `VersionRelease().run(...)` is called on them instead — the same
|
|
7
|
-
pattern `tests/core/test_check.py` already uses to test a `Check` subclass in
|
|
8
|
-
isolation — and `decide()` turns the resulting findings into a `Verdict` for
|
|
9
|
-
readable assertions. `REL-004`'s row already exists in
|
|
10
|
-
`policy/gate-registry.yaml` (with `grants: 0`), so `load().resolve("REL-004")`
|
|
11
|
-
resolves it fine; only the class-lookup step is bypassed.
|
|
12
|
-
|
|
13
|
-
`test_an_aligned_checkout_is_silent` and `test_a_drifted_checkout_reports_
|
|
14
|
-
both_mismatches` are `test.sh`'s own two corpora (`fixtures/aligned`,
|
|
15
|
-
`fixtures/mismatched`, ported byte-for-byte) and assert exactly what its `rg`
|
|
16
|
-
checks assert: the same rule id (`VER-001`), the same two finding paths and
|
|
17
|
-
messages, and that the corpus's one already-aligned manifest
|
|
18
|
-
(`.workflows/changesets/package.json`) is never named.
|
|
19
|
-
|
|
20
|
-
The remaining tests exercise `VERREL-INPUT`, the tier `check.sh`'s own bare
|
|
21
|
-
`fail()` calls became (see `check.py`'s module docstring) — untested by
|
|
22
|
-
`test.sh`, which never drives a corpus missing VERSION or CHANGELOG.md, the
|
|
23
|
-
same way `COV-003`'s and `PIP-001`'s invented `*-INPUT` tiers are proven by
|
|
24
|
-
fixtures the shell suite never had either.
|
|
25
|
-
"""
|
|
26
|
-
|
|
27
|
-
from __future__ import annotations
|
|
28
|
-
|
|
29
|
-
from collections.abc import Iterable
|
|
30
|
-
from contextlib import ExitStack
|
|
31
|
-
from pathlib import Path
|
|
32
|
-
|
|
33
|
-
from helpers import corpus
|
|
34
|
-
|
|
35
|
-
from adl_compliance import runner
|
|
36
|
-
from adl_compliance.checks.release.version_release import VersionRelease
|
|
37
|
-
from adl_compliance.core.context import Context, FileSet
|
|
38
|
-
from adl_compliance.core.verdict import Outcome, Verdict, decide
|
|
39
|
-
from adl_compliance.policy.registry import load
|
|
40
|
-
|
|
41
|
-
CORPORA = corpus("release", "version-release")
|
|
42
|
-
ALIGNED = CORPORA / "aligned"
|
|
43
|
-
MISMATCHED = CORPORA / "mismatched"
|
|
44
|
-
|
|
45
|
-
ROW = load().resolve("REL-004")
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
def _verdict(root: Path, given: Iterable[str] = (), trees: dict[str, str] | None = None) -> Verdict:
|
|
49
|
-
with ExitStack() as stack:
|
|
50
|
-
inputs = runner.resolve_inputs(VersionRelease, root, None, stack, trees)
|
|
51
|
-
ctx = Context(root=root, row=ROW, inputs=inputs)
|
|
52
|
-
findings = tuple(VersionRelease().run(ctx, FileSet(paths=tuple(given))))
|
|
53
|
-
return decide(ROW, findings, granted=0)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
def test_an_aligned_checkout_is_silent() -> None:
|
|
57
|
-
verdict = _verdict(ALIGNED)
|
|
58
|
-
assert verdict.outcome is Outcome.CLEAN, verdict.render()
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
def test_a_drifted_checkout_reports_both_mismatches() -> None:
|
|
62
|
-
verdict = _verdict(MISMATCHED)
|
|
63
|
-
assert verdict.outcome is Outcome.FINDINGS, verdict.render()
|
|
64
|
-
assert verdict.rules == ["VER-001", "VER-001"], verdict.render()
|
|
65
|
-
|
|
66
|
-
by_path = {f.path: f.message for f in verdict.findings}
|
|
67
|
-
assert by_path[".workflows/package.json"] == (
|
|
68
|
-
".workflows/package.json has version 1.2.2, expected 1.2.3 (from VERSION)"
|
|
69
|
-
)
|
|
70
|
-
assert by_path["CHANGELOG.md"] == (
|
|
71
|
-
"CHANGELOG.md's latest release heading is 1.2.0, expected 1.2.3 (from VERSION)"
|
|
72
|
-
)
|
|
73
|
-
# .workflows/changesets/package.json is aligned (1.2.3) in this fixture and
|
|
74
|
-
# must not be reported.
|
|
75
|
-
assert ".workflows/changesets/package.json" not in verdict.render()
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
def test_a_missing_version_file_is_an_input_finding(tmp_path: Path) -> None:
|
|
79
|
-
(tmp_path / "CHANGELOG.md").write_text("# Changelog\n\n## 1.2.3\n")
|
|
80
|
-
verdict = _verdict(tmp_path)
|
|
81
|
-
assert verdict.outcome is Outcome.FINDINGS, verdict.render()
|
|
82
|
-
assert verdict.rules == ["VERREL-INPUT"]
|
|
83
|
-
assert verdict.findings[0].path == "VERSION"
|
|
84
|
-
assert "VERSION is missing" in verdict.findings[0].message
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
def test_an_empty_version_file_is_an_input_finding(tmp_path: Path) -> None:
|
|
88
|
-
(tmp_path / "VERSION").write_text(" \n")
|
|
89
|
-
(tmp_path / "CHANGELOG.md").write_text("# Changelog\n\n## 1.2.3\n")
|
|
90
|
-
verdict = _verdict(tmp_path)
|
|
91
|
-
assert verdict.rules == ["VERREL-INPUT"], verdict.render()
|
|
92
|
-
assert "VERSION is empty" in verdict.findings[0].message
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
def test_a_non_semantic_version_is_an_input_finding(tmp_path: Path) -> None:
|
|
96
|
-
(tmp_path / "VERSION").write_text("v1.2\n")
|
|
97
|
-
(tmp_path / "CHANGELOG.md").write_text("# Changelog\n\n## 1.2.3\n")
|
|
98
|
-
verdict = _verdict(tmp_path)
|
|
99
|
-
assert verdict.rules == ["VERREL-INPUT"], verdict.render()
|
|
100
|
-
assert "not semantic x.y.z" in verdict.findings[0].message
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
def test_a_missing_changelog_is_an_input_finding(tmp_path: Path) -> None:
|
|
104
|
-
(tmp_path / "VERSION").write_text("1.2.3\n")
|
|
105
|
-
verdict = _verdict(tmp_path)
|
|
106
|
-
assert verdict.rules == ["VERREL-INPUT"], verdict.render()
|
|
107
|
-
assert verdict.findings[0].path == "CHANGELOG.md"
|
|
108
|
-
assert "CHANGELOG.md is missing" in verdict.findings[0].message
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
def test_a_changelog_with_no_release_heading_is_an_input_finding(tmp_path: Path) -> None:
|
|
112
|
-
(tmp_path / "VERSION").write_text("1.2.3\n")
|
|
113
|
-
(tmp_path / "CHANGELOG.md").write_text("# Changelog\n\n## [Unreleased]\n\n- wip\n")
|
|
114
|
-
verdict = _verdict(tmp_path)
|
|
115
|
-
assert verdict.rules == ["VERREL-INPUT"], verdict.render()
|
|
116
|
-
assert "unable to read latest CHANGELOG.md release version" in verdict.findings[0].message
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
def test_a_missing_versioned_manifest_is_an_input_finding(tmp_path: Path) -> None:
|
|
120
|
-
(tmp_path / "VERSION").write_text("1.2.3\n")
|
|
121
|
-
(tmp_path / "CHANGELOG.md").write_text("# Changelog\n\n## 1.2.3\n")
|
|
122
|
-
verdict = _verdict(tmp_path)
|
|
123
|
-
assert verdict.rules == ["VERREL-INPUT"], verdict.render()
|
|
124
|
-
assert verdict.findings[0].path == ".workflows/changesets/package.json"
|
|
125
|
-
assert "is missing" in verdict.findings[0].message
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
def test_a_redeclared_workflows_tree_is_honoured(tmp_path: Path) -> None:
|
|
129
|
-
"""FIXED 2026-09-15 (K-42 sweep): `VERSIONED_FILES` used to be hardcoded
|
|
130
|
-
`.workflows/...` literals read directly via `self.text(ctx, relative)`,
|
|
131
|
-
bypassing `ctx.inputs`/tree resolution entirely. A repository declaring
|
|
132
|
-
`workflows = "my-workflows"` (with its two manifests actually living
|
|
133
|
-
there) got both reported as flatly missing — LOUD, but against a path
|
|
134
|
-
that was never real, never the redeclared one. Drives a real `<workflows>`
|
|
135
|
-
redeclaration via `effective_trees`, not the packaged-default `trees=None`
|
|
136
|
-
every other test in this file uses."""
|
|
137
|
-
from adl_compliance.policy.registry import effective_trees
|
|
138
|
-
|
|
139
|
-
(tmp_path / "VERSION").write_text("1.2.3\n")
|
|
140
|
-
(tmp_path / "CHANGELOG.md").write_text("# Changelog\n\n## 1.2.3\n")
|
|
141
|
-
workflows = tmp_path / "my-workflows"
|
|
142
|
-
(workflows / "changesets").mkdir(parents=True)
|
|
143
|
-
manifest = '{\n "name": "fixture",\n "version": "1.2.3"\n}\n'
|
|
144
|
-
(workflows / "package.json").write_text(manifest)
|
|
145
|
-
(workflows / "changesets" / "package.json").write_text(manifest)
|
|
146
|
-
verdict = _verdict(tmp_path, trees=effective_trees({"workflows": "my-workflows"}))
|
|
147
|
-
assert verdict.outcome is Outcome.CLEAN, verdict.render()
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
def test_a_bracketed_changelog_heading_is_read_the_same_as_a_bare_one(tmp_path: Path) -> None:
|
|
151
|
-
"""`## [1.2.3] - 2024-01-01` and `## 1.2.3` both resolve to `1.2.3`."""
|
|
152
|
-
(tmp_path / "VERSION").write_text("1.2.3\n")
|
|
153
|
-
(tmp_path / "CHANGELOG.md").write_text(
|
|
154
|
-
"# Changelog\n\n## [1.2.3] - 2024-01-01\n\n- release\n"
|
|
155
|
-
)
|
|
156
|
-
workflows = tmp_path / ".workflows"
|
|
157
|
-
(workflows / "changesets").mkdir(parents=True)
|
|
158
|
-
manifest = '{\n "name": "fixture",\n "version": "1.2.3"\n}\n'
|
|
159
|
-
(workflows / "package.json").write_text(manifest)
|
|
160
|
-
(workflows / "changesets" / "package.json").write_text(manifest)
|
|
161
|
-
verdict = _verdict(tmp_path)
|
|
162
|
-
assert verdict.outcome is Outcome.CLEAN, verdict.render()
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"""REP-004 — no executable invocation of a banned command inside this package.
|
|
2
|
-
|
|
3
|
-
GIT-001 a standalone version-control command.
|
|
4
|
-
GRP-001 a standalone legacy search command.
|
|
5
|
-
|
|
6
|
-
Two rules, one table, because they differed only in the forbidden word.
|
|
7
|
-
|
|
8
|
-
**This gate would report itself if written naively** (K-15). A check that
|
|
9
|
-
forbids a string necessarily contains it, so both words are ASSEMBLED from
|
|
10
|
-
fragments below and appear nowhere in this file as a single token — the shell
|
|
11
|
-
version was flagged at its own line 85 before it did the same.
|
|
12
|
-
|
|
13
|
-
The extension test is SUBJECT MATTER, not scope. It asks what KIND of file this
|
|
14
|
-
is — the rule is about shell, and a `.md` file naming a command is prose. A path
|
|
15
|
-
PREFIX would be a different question, "where is this file", and that is the row's
|
|
16
|
-
`engine.scope` to answer; an earlier draft filtered `compliance/**` inside the
|
|
17
|
-
script and that is the hand-rolled path list AGENTS.md forbids.
|
|
18
|
-
|
|
19
|
-
What the port deletes is everything the shell needed to REACH the search: a
|
|
20
|
-
`command -v rg` prologue, `mktemp` with a NUL-delimited list because the tree has
|
|
21
|
-
paths with spaces, an `xargs -0 sh -c` batch wrapper, and the exit-status
|
|
22
|
-
translation inside it — GNU `xargs` collapses every utility exit in 1..125 to
|
|
23
|
-
123, so rg's "no matches" and "real error" arrived identically. `re` has no exit
|
|
24
|
-
status to translate.
|
|
25
|
-
"""
|
|
26
|
-
|
|
27
|
-
from __future__ import annotations
|
|
28
|
-
|
|
29
|
-
import re
|
|
30
|
-
from collections.abc import Iterable
|
|
31
|
-
from typing import ClassVar, NamedTuple
|
|
32
|
-
|
|
33
|
-
from ....core.check import Check
|
|
34
|
-
from ....core.context import Context, FileSet
|
|
35
|
-
from ....core.finding import Report
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
class Banned(NamedTuple):
|
|
39
|
-
rule: str
|
|
40
|
-
word: str
|
|
41
|
-
message: str
|
|
42
|
-
fix: str
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
class BannedCommands(Check):
|
|
46
|
-
id: ClassVar[str] = "REP-004"
|
|
47
|
-
|
|
48
|
-
SHELL_SUFFIXES: ClassVar[tuple[str, ...]] = (".sh", ".bash", ".zsh")
|
|
49
|
-
JUSTFILE: ClassVar[str] = "justfile"
|
|
50
|
-
|
|
51
|
-
# Assembled, never spelled. Written as one token, this file becomes a
|
|
52
|
-
# violation of the rule it enforces -- and a true one, by the rule's own
|
|
53
|
-
# definition.
|
|
54
|
-
VCS_WORD: ClassVar[str] = "gi" + "t"
|
|
55
|
-
SEARCH_WORD: ClassVar[str] = "gr" + "ep"
|
|
56
|
-
|
|
57
|
-
BOUNDARY: ClassVar[str] = r"(?:^|[;&|()`\s'\"])"
|
|
58
|
-
"""A command START. The backtick is in the class so a command substitution
|
|
59
|
-
opening with one is still recognised; the original GRP-001 pattern omitted
|
|
60
|
-
it and the original GIT-001 pattern is the one kept."""
|
|
61
|
-
|
|
62
|
-
TRAILING: ClassVar[str] = r"(?:\s|$)"
|
|
63
|
-
|
|
64
|
-
COMMENT: ClassVar[re.Pattern[str]] = re.compile(r"^\s*#")
|
|
65
|
-
"""A WHOLE-LINE comment only. Deliberately conservative: a trailing comment
|
|
66
|
-
on a real command line stays flagged, because deciding whether a mid-line
|
|
67
|
-
'#' opens a comment or sits inside a quoted string needs a shell parser, and
|
|
68
|
-
over-reporting is the safe direction."""
|
|
69
|
-
|
|
70
|
-
def banned(self) -> tuple[Banned, ...]:
|
|
71
|
-
return (
|
|
72
|
-
Banned(
|
|
73
|
-
rule="GIT-001",
|
|
74
|
-
word=self.VCS_WORD,
|
|
75
|
-
message="version-control invocation is forbidden inside the compliance package",
|
|
76
|
-
fix="read the set the runner hands you, or drop the call if it only built "
|
|
77
|
-
"a repository the assertion never needed",
|
|
78
|
-
),
|
|
79
|
-
Banned(
|
|
80
|
-
rule="GRP-001",
|
|
81
|
-
word=self.SEARCH_WORD,
|
|
82
|
-
message="standalone legacy search command is forbidden; use rg",
|
|
83
|
-
fix="replace this invocation with an equivalent rg call",
|
|
84
|
-
),
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
def graded(self, ctx: Context, files: FileSet) -> Iterable[Report]:
|
|
88
|
-
targets = sorted(p for p in files if self._is_shell(p))
|
|
89
|
-
for relative in FileSet(paths=tuple(targets)).existing(ctx.root):
|
|
90
|
-
for entry in self.banned():
|
|
91
|
-
pattern = re.compile(f"{self.BOUNDARY}{re.escape(entry.word)}{self.TRAILING}")
|
|
92
|
-
for line, found in self.scan(ctx, relative, pattern):
|
|
93
|
-
# `found.string` is the line: `scan` matches line by line.
|
|
94
|
-
if self.COMMENT.match(found.string):
|
|
95
|
-
continue
|
|
96
|
-
yield self.report(
|
|
97
|
-
relative, f"{entry.message} ({found.string.strip()})",
|
|
98
|
-
entry.fix, rule=entry.rule, line=line,
|
|
99
|
-
)
|
|
100
|
-
|
|
101
|
-
def _is_shell(self, relative: str) -> bool:
|
|
102
|
-
name = relative.rsplit("/", 1)[-1]
|
|
103
|
-
return name == self.JUSTFILE or relative.endswith(self.SHELL_SUFFIXES)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fn main() {}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# fixture lock
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fn main() {}
|
|
File without changes
|
package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/grants-registry.yaml
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
schema: adl.exception-register/v1
|
|
2
|
-
created: '2026-08-22'
|
|
3
|
-
catalogs:
|
|
4
|
-
- path: compliance/policy/grants/typescript.audit.yaml
|
|
5
|
-
source: retired 2026-08-23 (frontend-bun-audit-exceptions.json deleted; catalog is now the sole record)
|
|
6
|
-
source_count: 0
|
|
7
|
-
- path: compliance/policy/grants/rust.audit.yaml
|
|
8
|
-
source: retired 2026-08-23 (backend-cargo-audit-exceptions.json deleted; catalog is now the sole record)
|
|
9
|
-
source_count: 0
|
|
10
|
-
# backend-parity.yaml removed 2026-08-23. Parity with the legacy
|
|
11
|
-
# check-rust-policy.py was reached, the catalog held zero entries, and no
|
|
12
|
-
# `.py` remains under .workflows/ for it to be parity WITH. The register
|
|
13
|
-
# outlived the file by a day and blocked gate-profile-report until now.
|
|
14
|
-
- path: compliance/policy/grants/rust.run-001-command-boundary.yaml
|
|
15
|
-
source: .workflows/config/profiles/rule-profiles.yaml (rust.run-001-command-boundary)
|
|
16
|
-
source_count: 2
|
|
17
|
-
- path: compliance/policy/grants/rust.todo-unimplemented-in-test.yaml
|
|
18
|
-
source: .workflows/config/profiles/rule-profiles.yaml (rust.todo-unimplemented-in-test)
|
|
19
|
-
source_count: 1
|
|
20
|
-
- path: compliance/policy/grants/rust.no-ignore-in-tests.yaml
|
|
21
|
-
source: .workflows/config/profiles/rule-profiles.yaml (rust.no-ignore-in-tests)
|
|
22
|
-
source_count: 0
|
|
23
|
-
# emptied 2026-08-24: all 19 inherited #[ignore] uses migrated to Cargo
|
|
24
|
-
# feature gating the same day (rust.no-ignore-in-tests report now clean
|
|
25
|
-
# with zero exceptions). File kept as entries: [] -- deletion is blocked
|
|
26
|
-
# by the sandbox for this tree; the profile row's `exceptions:` reference
|
|
27
|
-
# stays valid rather than pointing at a removed file.
|
|
28
|
-
- path: compliance/policy/grants/typescript.no-test-skip.yaml
|
|
29
|
-
source: .workflows/config/profiles/rule-profiles.yaml (typescript.no-test-skip)
|
|
30
|
-
source_count: 71
|
|
31
|
-
# 2743 -> 6045 on 2026-08-23: the old backlog measures 0 and the count is now
|
|
32
|
-
# entirely ultracite/biome/type-aware's eight project-scanner rules.
|
|
33
|
-
- path: compliance/policy/grants/framework.inline-suppressions.yaml
|
|
34
|
-
source: tracked repository inline markers at 8094e112 excluding plan examples
|
|
35
|
-
baseline_source_count: 145
|
|
36
|
-
source_count: 186
|
|
37
|
-
- path: compliance/policy/grants/typescript.bundle-size.yaml
|
|
38
|
-
source: compliance/policy/grants/typescript.bundle-size.yaml
|
|
39
|
-
source_count: 1
|
|
40
|
-
- path: compliance/policy/grants/rust.verified-exception.yaml
|
|
41
|
-
source: compliance/policy/grants/rust.verified-exception-entry.yaml
|
|
42
|
-
source_count: 0
|
|
43
|
-
- path: compliance/policy/grants/rust.crate-edges.yaml
|
|
44
|
-
source: compliance/policy/inputs/rust-crate-register.yaml
|
|
45
|
-
source_count: 0
|
|
46
|
-
# frontend-symbols.yaml removed 2026-08-23 together with its source register
|
|
47
|
-
# .workflows/config/frontend/frontend-symbol-register.yaml (DEF-0029): the
|
|
48
|
-
# catalog held zero entries and the register's documented consumers did not
|
|
49
|
-
# exist, so it granted nothing to nobody.
|
|
50
|
-
- path: compliance/policy/grants/framework.no-python.yaml
|
|
51
|
-
source: .workflows/scripts/gates/meta/check-no-python.sh (PY-01)
|
|
52
|
-
source_count: 2
|
|
53
|
-
- path: compliance/policy/grants/framework.no-silent-degrade.yaml
|
|
54
|
-
source: .workflows/scripts/gates/meta/check-no-silent-degrade.sh (SD-01, SD-02)
|
|
55
|
-
source_count: 1
|
|
56
|
-
# Registered 2026-08-23. All three suppressed real frontend findings while
|
|
57
|
-
# appearing in no register, in no profile row's `exceptions:` field, and in no
|
|
58
|
-
# column of the debt report. An allowance nobody can enumerate is not a
|
|
59
|
-
# reviewed exception, it is an unrecorded one.
|
|
60
|
-
- path: compliance/policy/baselines/typescript.dead-code-accounting.yaml
|
|
61
|
-
source: compliance/policy/grants/typescript.dead-code.yaml
|
|
62
|
-
source_count: 669
|
|
63
|
-
# frontend-english-only.yaml retired 2026-08-27, per DEF-0050's own
|
|
64
|
-
# requirement ("Retire frontend-english-only.yaml and its index entry with
|
|
65
|
-
# it"). 40 -> 0: the docs.english-only row no longer declares an
|
|
66
|
-
# `exceptions:` field at all, so this catalog grants nothing regardless of
|
|
67
|
-
# its contents. Its last 40 findings resolved two ways, not one: the 7
|
|
68
|
-
# officecli-pitch-deck untranslated-donor-jargon findings were FIXED in
|
|
69
|
-
# place (Englishized, with dev/seed/capabilities/skill.csv's
|
|
70
|
-
# content_sha256 recomputed per backend/crates/enact-db/src/repository/skill.rs:81);
|
|
71
|
-
# the other 33 were reclassified as SCOPE, not an exception -- CJK-handling
|
|
72
|
-
# code and test fixtures (frontend) or byte-exact/matcher CJK technical
|
|
73
|
-
# content (dev/seed/capabilities/skill.csv), never prose to translate.
|
|
74
|
-
# Scope now lives in .workflows/config/docs/english-only-scope.yaml,
|
|
75
|
-
# resolved via gate_path docs.english_only_scope and read directly by the
|
|
76
|
-
# gate -- the same reason layout.directory-ratchet's own
|
|
77
|
-
# excluded_paths/excluded_single_files hold no index entry either: a scope
|
|
78
|
-
# exclusion is never a grant this register holds.
|
|
79
|
-
#
|
|
80
|
-
# The entry itself is now gone too. It was kept as `entries: []` only so
|
|
81
|
-
# `source_count` would match a file that still existed; the restructure
|
|
82
|
-
# deleted .workflows/config/exceptions/ entirely, and an index row naming an
|
|
83
|
-
# absent catalog is a hard failure in gate-profile-report, not a harmless
|
|
84
|
-
# leftover -- it took framework.violation-baseline down to "could not run".
|
|
85
|
-
# 224 -> 92 on 2026-08-27. Three owner decisions in one change: every
|
|
86
|
-
# max_children ceiling raised to 20, `.workflows` dropped as a scanned tree,
|
|
87
|
-
# and two SCOPE mechanisms added to the baseline (excluded_paths,
|
|
88
|
-
# excluded_single_files) for shapes the rule should never have judged --
|
|
89
|
-
# locale directories, vendored skill and harness assets, per-domain seed
|
|
90
|
-
# CSVs, and any directory whose only file is a Cargo.toml or a main.tf.
|
|
91
|
-
# 124 entries were deleted as dead rather than granted away.
|
|
92
|
-
- path: compliance/policy/baselines/layout.directory-ratchet-accounting.yaml
|
|
93
|
-
source: compliance/policy/grants/layout.directory-ratchet.yaml
|
|
94
|
-
source_count: 92
|
|
95
|
-
# frontend-size-ratchet.yaml and its baseline removed 2026-08-24 with the
|
|
96
|
-
# frontend.file-function-ratchet gate they served. The gate graded files and
|
|
97
|
-
# functions by LINE COUNT as a proxy for bundle size, and line count does not
|
|
98
|
-
# determine shipped bytes -- frontend.bundle-size measures those directly,
|
|
99
|
-
# including the singleChunkMb ceiling. 218 overrides for a proxy metric with
|
|
100
|
-
# no evidence it achieved its stated purpose. Owner decision.
|
|
101
|
-
# The shared empty catalog, added 2026-08-27. Every row in the profile
|
|
102
|
-
# registry now names a grants catalog, so `granted` is a signed number rather
|
|
103
|
-
# than an absent key. This changes nothing about enforcement -- absence
|
|
104
|
-
# already meant zero, per the mechanism in AGENTS.md -- it only makes the
|
|
105
|
-
# zero explicit and reviewable. 128 of the 142 gates grant nothing and all
|
|
106
|
-
# point here rather than each carrying an identical zero-entry file: 128 empty
|
|
107
|
-
# catalogs would breach the .workflows directory-ratchet ceiling and add 128
|
|
108
|
-
# register rows describing nothing. A gate leaves this catalog the moment it
|
|
109
|
-
# needs its first grant, which makes that switch visible in review.
|
|
110
|
-
- path: compliance/policy/grants/zero.yaml
|
|
111
|
-
source: compliance/policy/gate-registry.yaml (every gate granting nothing)
|
|
112
|
-
source_count: 0
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
/**
|
|
3
|
-
* Proves that an immutable npm version is the artifact built from this exact
|
|
4
|
-
* commit. A matching semantic version is not enough: npm never replaces a
|
|
5
|
-
* published version, so a prior publication from another commit must stop the
|
|
6
|
-
* release rather than make a later pipeline run look green.
|
|
7
|
-
*/
|
|
8
|
-
import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync } from 'node:fs'
|
|
9
|
-
import { isAbsolute, join, normalize, resolve } from 'node:path'
|
|
10
|
-
|
|
11
|
-
interface Metadata {
|
|
12
|
-
version?: unknown
|
|
13
|
-
gitHead?: unknown
|
|
14
|
-
'dist.tarball'?: unknown
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
interface Arguments {
|
|
18
|
-
packageName: string
|
|
19
|
-
version: string
|
|
20
|
-
gitHead: string
|
|
21
|
-
source: string
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const usage =
|
|
25
|
-
'usage: bun workflows/scripts/release/verify-npm-artifact.ts --package <npm-package> --version <version> --git-head <build-source-version> --source <repo-relative-source-path>'
|
|
26
|
-
|
|
27
|
-
const fail = (message: string): never => {
|
|
28
|
-
throw new Error(message)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function parseArguments(argv: string[]): Arguments {
|
|
32
|
-
const values = new Map<string, string>()
|
|
33
|
-
for (let index = 0; index < argv.length; index += 2) {
|
|
34
|
-
const flag = argv[index]
|
|
35
|
-
const value = argv[index + 1]
|
|
36
|
-
if (flag === undefined || value === undefined || !['--package', '--version', '--git-head', '--source'].includes(flag) || values.has(flag)) {
|
|
37
|
-
fail(usage)
|
|
38
|
-
}
|
|
39
|
-
values.set(flag, value)
|
|
40
|
-
}
|
|
41
|
-
const packageName = values.get('--package')
|
|
42
|
-
const version = values.get('--version')
|
|
43
|
-
const gitHead = values.get('--git-head')
|
|
44
|
-
const source = values.get('--source')
|
|
45
|
-
if (packageName === undefined || version === undefined || gitHead === undefined || source === undefined || values.size !== 4) fail(usage)
|
|
46
|
-
return { packageName, version, gitHead, source }
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function command(commandName: string, args: string[]): { stdout: string; stderr: string } {
|
|
50
|
-
const result = Bun.spawnSync([commandName, ...args], { stdin: 'ignore', stdout: 'pipe', stderr: 'pipe' })
|
|
51
|
-
const stdout = result.stdout.toString()
|
|
52
|
-
const stderr = result.stderr.toString()
|
|
53
|
-
if ((result.exitCode ?? 1) !== 0) {
|
|
54
|
-
fail(`${commandName} failed while verifying the published artifact${stderr.trim() === '' ? '' : `: ${stderr.trim()}`}`)
|
|
55
|
-
}
|
|
56
|
-
return { stdout, stderr }
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function metadataFor(packageName: string, version: string): Metadata {
|
|
60
|
-
const { stdout } = command('npm', ['view', `${packageName}@${version}`, 'version', 'gitHead', 'dist.tarball', '--json'])
|
|
61
|
-
try {
|
|
62
|
-
return JSON.parse(stdout) as Metadata
|
|
63
|
-
} catch {
|
|
64
|
-
fail('npm returned malformed package metadata while verifying the published artifact')
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function sourcePath(source: string): string {
|
|
69
|
-
if (isAbsolute(source) || source === '' || source.split(/[\\/]/).some((segment) => segment === '..' || segment === '')) {
|
|
70
|
-
fail(`source must be a non-empty repository-relative path: ${source}`)
|
|
71
|
-
}
|
|
72
|
-
const root = resolve(process.cwd())
|
|
73
|
-
const path = resolve(root, normalize(source))
|
|
74
|
-
if (!path.startsWith(`${root}/`) || !existsSync(path)) fail(`source file does not exist: ${source}`)
|
|
75
|
-
return path
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function httpsTarball(value: string): string {
|
|
79
|
-
try {
|
|
80
|
-
if (new URL(value).protocol !== 'https:') fail('published dist.tarball must be an HTTPS URL')
|
|
81
|
-
} catch (error) {
|
|
82
|
-
if (error instanceof Error && error.message === 'published dist.tarball must be an HTTPS URL') throw error
|
|
83
|
-
fail('published dist.tarball must be an HTTPS URL')
|
|
84
|
-
}
|
|
85
|
-
return value
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function main(): void {
|
|
89
|
-
const args = parseArguments(process.argv.slice(2))
|
|
90
|
-
const localSource = sourcePath(args.source)
|
|
91
|
-
const metadata = metadataFor(args.packageName, args.version)
|
|
92
|
-
if (metadata.version !== args.version) fail(`published version mismatch: expected ${args.version}, received ${String(metadata.version)}`)
|
|
93
|
-
if (metadata.gitHead !== args.gitHead) fail(`published gitHead mismatch: expected ${args.gitHead}, received ${String(metadata.gitHead)}`)
|
|
94
|
-
const tarball = metadata['dist.tarball']
|
|
95
|
-
if (typeof tarball !== 'string' || tarball === '') fail('published package metadata has no dist.tarball')
|
|
96
|
-
const verifiedTarball = httpsTarball(tarball)
|
|
97
|
-
|
|
98
|
-
const scratchRoot = join(process.cwd(), '.scratchpad')
|
|
99
|
-
mkdirSync(scratchRoot, { recursive: true })
|
|
100
|
-
const temporary = mkdtempSync(join(scratchRoot, 'release-artifact-'))
|
|
101
|
-
const archive = join(temporary, 'package.tgz')
|
|
102
|
-
try {
|
|
103
|
-
command('curl', ['--fail', '--location', '--silent', '--show-error', '--output', archive, '--', verifiedTarball])
|
|
104
|
-
const packed = command('tar', ['-xOzf', archive, `package/${args.source}`]).stdout
|
|
105
|
-
const local = readFileSync(localSource)
|
|
106
|
-
if (!Buffer.from(packed).equals(local)) fail(`published packed source mismatch: package/${args.source} does not match this checkout`)
|
|
107
|
-
} finally {
|
|
108
|
-
rmSync(temporary, { recursive: true, force: true })
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
console.log(`verified ${args.packageName}@${args.version}: gitHead and package/${args.source} match this checkout`)
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
try {
|
|
115
|
-
main()
|
|
116
|
-
} catch (error) {
|
|
117
|
-
console.error(`release artifact verification failed: ${error instanceof Error ? error.message : String(error)}`)
|
|
118
|
-
process.exitCode = 1
|
|
119
|
-
}
|