atlas-iac/testing/quality_contract.json

581 lines
26 KiB
JSON
Raw Normal View History

{
"required_docs": [
{
"path": "README.md",
"description": "Top-level repository handbook."
},
{
"path": "Jenkinsfile",
"description": "Top-level Jenkins mirror for multibranch discovery."
},
{
"path": "ci/Jenkinsfile.titan-iac",
"description": "Canonical titan-iac Jenkins pipeline definition."
}
],
"managed_modules": [
"ci/scripts/hermes_image_release.py",
"dockerfiles/hermes-kaniko-heredoc-runner.py",
"services/harbor/scripts/harbor_hermes_agent_immutability_ensure.py",
"services/hermes/scripts/hermes_image_release_status.py",
"services/hermes/scripts/voice_route_preflight.py",
"services/hermes/scripts/jenkins_image_build_trigger.py",
"ci/scripts/publish_test_metrics.py",
"ci/scripts/publish_test_metrics_quality.py",
"ci/scripts/semgrep_report.py",
"ci/scripts/supply_chain_report.py",
"services/mailu/scripts/mailu_sync.py",
"services/mailu/scripts/mailu_sync_listener.py",
2026-08-17 08:16:35 -03:00
"services/hermes/scripts/cli_lane_board.py",
"services/hermes/scripts/cli_lane_capabilities.py",
"services/hermes/scripts/cli_lane_config.py",
"services/hermes/scripts/cli_lane_dispatch.py",
"services/hermes/scripts/cli_lane_evidence.py",
"services/hermes/scripts/cli_lane_execution.py",
"services/hermes/scripts/cli_lane_failover.py",
2026-08-17 08:16:35 -03:00
"services/hermes/scripts/cli_lane_files.py",
"services/hermes/scripts/cli_lane_finalization.py",
"services/hermes/scripts/cli_lane_goal.py",
"services/hermes/scripts/cli_lane_health.py",
"services/hermes/scripts/cli_lane_metrics.py",
2026-08-17 08:16:35 -03:00
"services/hermes/scripts/cli_lane_prompt.py",
"services/hermes/scripts/cli_lane_provider.py",
"services/hermes/scripts/cli_lane_quarantine.py",
"services/hermes/scripts/cli_lane_quota.py",
2026-08-17 08:16:35 -03:00
"services/hermes/scripts/cli_lane_records.py",
"services/hermes/scripts/cli_lane_recovery.py",
"services/hermes/scripts/cli_lane_retention.py",
"services/hermes/scripts/cli_lane_routing.py",
"services/hermes/scripts/cli_lane_runner.py",
2026-08-18 06:28:49 -03:00
"services/hermes/scripts/kanban_supervisor.py",
"services/hermes/scripts/supervisor_policy.py",
"testing/__init__.py",
"testing/quality_contract.py",
"testing/quality_docs.py",
"testing/quality_hygiene.py",
"testing/quality_coverage.py",
"testing/quality_gate.py",
"ci/tests/glue/test_ariadne_schedules.py",
"ci/tests/glue/test_glue_metrics.py",
"testing/tests/test_publish_test_metrics.py",
"testing/tests/test_supply_chain_report.py",
"testing/tests/test_semgrep_report.py",
"testing/tests/test_quality_contract.py",
"testing/tests/test_quality_gate.py",
"services/gitea/scripts/gitea_branch_protection_check.py",
"services/hermes/scm-common/scripts/gitea_api.py",
"services/hermes/scm-common/scripts/gitea_api_policy.py",
"services/hermes/scm-common/scripts/scm_broker.py",
"services/hermes/scm-common/scripts/scm_broker_client.py",
"services/hermes/scm-common/scripts/scm_broker_io.py",
"services/hermes/scm-common/scripts/scm_broker_server.py",
"services/hermes/scripts/execution_pool_client.py",
"services/hermes/scripts/execution_pool_coordinator.py",
hermes: make pool lease recovery and release isolation safe Independent review t_5975c06a blocked this branch on a P1: a Kanban write that failed while a lease expired left a `lease_failed` row that was invisible to every pass, immortal to garbage collection, and fatal to the coordinator. It poisoned `reconcile()` forever with a conflicting-duplicate primary key, produced a spurious capability `block_task` from `dispatch()`, and -- because startup maintenance ran unguarded before the port bound, against a store on a PVC -- crash-looped the coordinator with no automatic recovery. `lease_failed` is now a retryable state that every maintenance pass drains, and a row only reaches a terminal state on authoritative evidence about its exact Kanban run, so nothing is collected before its outcome is known and nothing is silently dropped. Each row, task, and board is processed in isolation, and a coordinator-side fault is never converted into a Kanban mutation. Startup runs through the same guarded cycle as the steady-state loop. The wire protocol and the durable store are now separate modules, and the maintenance passes moved out of the coordinator, so each file stays under the managed line ceiling with room for the recovery logic. Also closes three consequential handoff risks the same review raised: * mediator-N pinned itself hard to worker-N while sharing a ReadWriteOnce claim, so a drain or preemption that moved only the lower-priority worker deadlocked the ordinal on Multi-Attach until an operator deleted a Pod. The shared workspace is now ReadWriteMany (as the hermes-chat tenant workspaces already are on the same class), colocation is a preference, and the mediator shares the worker's preemption priority, so each Pod reschedules on its own. * the broker permits only branch creation, so a retry that added commits could never submit and the run's work was discarded with the failure. Submission now targets a fresh attempt- or content-scoped ref in the same reviewed namespace -- never an update -- and is idempotent under replay. A refused submission downgrades the result and says why instead of unwinding the run. * the provider CLIs were reinstalled into an emptyDir on every Pod start inside the 10m Flux health window for the whole hermes app. They now install once per pinned version onto a durable volume, re-verified against the real binaries and time-bounded, and the best-effort pool no longer gates the health of the app its dependents wait on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 16:31:15 +00:00
"services/hermes/scripts/execution_pool_maintenance.py",
"services/hermes/scripts/execution_pool_project.py",
"services/hermes/scripts/execution_pool_protocol.py",
"services/hermes/scripts/execution_pool_scm.py",
"services/hermes/scripts/execution_pool_server.py",
hermes: make pool lease recovery and release isolation safe Independent review t_5975c06a blocked this branch on a P1: a Kanban write that failed while a lease expired left a `lease_failed` row that was invisible to every pass, immortal to garbage collection, and fatal to the coordinator. It poisoned `reconcile()` forever with a conflicting-duplicate primary key, produced a spurious capability `block_task` from `dispatch()`, and -- because startup maintenance ran unguarded before the port bound, against a store on a PVC -- crash-looped the coordinator with no automatic recovery. `lease_failed` is now a retryable state that every maintenance pass drains, and a row only reaches a terminal state on authoritative evidence about its exact Kanban run, so nothing is collected before its outcome is known and nothing is silently dropped. Each row, task, and board is processed in isolation, and a coordinator-side fault is never converted into a Kanban mutation. Startup runs through the same guarded cycle as the steady-state loop. The wire protocol and the durable store are now separate modules, and the maintenance passes moved out of the coordinator, so each file stays under the managed line ceiling with room for the recovery logic. Also closes three consequential handoff risks the same review raised: * mediator-N pinned itself hard to worker-N while sharing a ReadWriteOnce claim, so a drain or preemption that moved only the lower-priority worker deadlocked the ordinal on Multi-Attach until an operator deleted a Pod. The shared workspace is now ReadWriteMany (as the hermes-chat tenant workspaces already are on the same class), colocation is a preference, and the mediator shares the worker's preemption priority, so each Pod reschedules on its own. * the broker permits only branch creation, so a retry that added commits could never submit and the run's work was discarded with the failure. Submission now targets a fresh attempt- or content-scoped ref in the same reviewed namespace -- never an update -- and is idempotent under replay. A refused submission downgrades the result and says why instead of unwinding the run. * the provider CLIs were reinstalled into an emptyDir on every Pod start inside the 10m Flux health window for the whole hermes app. They now install once per pinned version onto a durable volume, re-verified against the real binaries and time-bounded, and the best-effort pool no longer gates the health of the app its dependents wait on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 16:31:15 +00:00
"services/hermes/scripts/execution_pool_store.py",
"services/hermes/scripts/execution_pool_worker.py",
"services/hermes/scripts/hermes_coordinator.py",
"services/hermes/scripts/node_account_audit.py",
"services/hermes/scripts/node_account_hardening.py",
"services/hermes/scripts/node_account_io.py",
"services/hermes/scripts/stage_runtime_access.py",
"services/hermes/scm-common/scripts/deadline_http.py",
"services/hermes/scm-common/scripts/git_pack_objects.py",
"services/hermes/scm-common/scripts/receive_pack_scan.py",
"services/hermes/scripts/node_polkit_audit.py",
"scripts/ops/hermes_handoff_acceptance.py",
fix(hermes): close the zero-evidence fail-open in absence checks evaluate_names_absent returned PASS when its step exited 0 with no output, so five mandatory checks - the ones asserting that provider API keys, forge credentials, a cluster-admin binding, and shared coordinator state are absent - could report a pass on no evidence and turn a NO_GO into a GO. Both name rules now resolve their step through one guard in _line_step, so zero observations are NOT_RUN. Regressions pin all five real catalog specs plus both reachable silence paths: a POSIX pipeline whose status comes from its last stage, and a drifted kubectl -o jsonpath. The pool claim projection emits one <volume>=<claim> line per template volume so a volume without a PVC still counts as an observation rather than reading as drift. Also closes the review's reachable hardening and evidence defects: - pin Gitea paths to atlas/titan-iac on an exact segment boundary and reject relative segments, including percent-encoded ones - forbid impersonation structurally in every mode and vantage; the inner command of kubectl exec is re-checked rather than exempted, and validate_catalog no longer guards only the operator vantage - drop flux and helm from the binary allowlist; they had no pinned release digest, so no allowlisted binary can now be admitted that the executor would refuse to attest - remove the inert --concurrency and --expect-telegram-sessions flags and the dead concurrency bound; Telegram continuity stays mandatory - read the ephemeral pull index page by page, treat the create response as an authoritative source for the pull number, close every number either source names, and surface residue_ref plus exact manual_cleanup commands when creation is uncertain - keep executable_path and executable_sha256 on unrecorded bulk-evidence steps so withholding bytes never withholds binary attestation - revert the repo-wide hygiene legacy-exception mechanism; the contract change here is purely additive and the four pre-existing over-cap files are left to the canonical contract change in PR #14/#15 - correct the runbook ruff format scope so the documented command passes Split hermes_handoff_arming.py out of hermes_handoff_ephemeral.py to keep both modules under the 500-line cap. All 16 handoff modules hold at least 95% line and branch coverage; the mutation gate is 13/13. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 16:24:37 +00:00
"scripts/ops/hermes_handoff_arming.py",
"scripts/ops/hermes_handoff_catalog.py",
"scripts/ops/hermes_handoff_checks_access.py",
"scripts/ops/hermes_handoff_checks_delivery.py",
"scripts/ops/hermes_handoff_checks_platform.py",
"scripts/ops/hermes_handoff_checks_workers.py",
"scripts/ops/hermes_handoff_ephemeral.py",
"scripts/ops/hermes_handoff_evaluators.py",
"scripts/ops/hermes_handoff_exec.py",
"scripts/ops/hermes_handoff_json_rules.py",
"scripts/ops/hermes_handoff_model.py",
"scripts/ops/hermes_handoff_policy.py",
"scripts/ops/hermes_handoff_redaction.py",
"scripts/ops/hermes_handoff_rules.py",
"scripts/ops/hermes_handoff_run.py",
"testing/quality_handoff_mutation.py",
"dockerfiles/hermes-hux-foundation/hux/__init__.py",
"dockerfiles/hermes-hux-foundation/hux/artifacts.py",
"dockerfiles/hermes-hux-foundation/hux/audit.py",
"dockerfiles/hermes-hux-foundation/hux/budgets.py",
"dockerfiles/hermes-hux-foundation/hux/contracts.py",
"dockerfiles/hermes-hux-foundation/hux/diffs.py",
"dockerfiles/hermes-hux-foundation/hux/errors.py",
"dockerfiles/hermes-hux-foundation/hux/events.py",
"dockerfiles/hermes-hux-foundation/hux/flags.py",
"dockerfiles/hermes-hux-foundation/hux/foundation.py",
"dockerfiles/hermes-hux-foundation/hux/http.py",
"dockerfiles/hermes-hux-foundation/hux/identity.py",
"dockerfiles/hermes-hux-foundation/hux/memory.py",
"dockerfiles/hermes-hux-foundation/hux/modes.py",
"dockerfiles/hermes-hux-foundation/hux/multimodal.py",
"dockerfiles/hermes-hux-foundation/hux/organization.py",
"dockerfiles/hermes-hux-foundation/hux/policy.py",
"dockerfiles/hermes-hux-foundation/hux/privacy.py",
"dockerfiles/hermes-hux-foundation/hux/redaction.py",
"dockerfiles/hermes-hux-foundation/hux/releases.py",
"dockerfiles/hermes-hux-foundation/hux/release_security.py",
"dockerfiles/hermes-hux-foundation/hux/retention_scheduler.py",
"dockerfiles/hermes-hux-foundation/hux/research.py",
"dockerfiles/hermes-hux-foundation/hux/rules.py",
"dockerfiles/hermes-hux-foundation/hux/server.py",
"dockerfiles/hermes-hux-foundation/hux/store.py",
"dockerfiles/hermes-hux-foundation/hux/suggestions.py",
"dockerfiles/hermes-hux-foundation/hux_producer/__init__.py",
"dockerfiles/hermes-worker-hux/hux_hook/__init__.py",
"dockerfiles/hermes-worker-hux/hux_hook/client.py",
"dockerfiles/hermes-worker-hux/hux_hook/hooks.py",
"services/hermes/plugins/auto-router/hux_mode.py",
"services/hermes/plugins/hux-runtime/__init__.py",
"services/hermes/plugins/hux-runtime/context_ids.py",
"services/hermes/plugins/hux-runtime/emitters.py",
"services/hermes/plugins/hux-runtime/runtime.py",
"services/hermes/plugins/hux-runtime/tool_policy.py"
],
"lint_paths": [
"ci/scripts/hermes_image_release.py",
"dockerfiles/hermes-kaniko-heredoc-runner.py",
"services/harbor/scripts/harbor_hermes_agent_immutability_ensure.py",
"services/hermes/scripts/hermes_image_release_status.py",
"services/hermes/scripts/voice_route_preflight.py",
"services/hermes/scripts/jenkins_image_build_trigger.py",
"ci/scripts/publish_test_metrics.py",
"ci/scripts/publish_test_metrics_quality.py",
"ci/scripts/semgrep_report.py",
"ci/tests/glue",
"scripts/tests",
"services/comms/scripts/tests",
"services/mailu/scripts/mailu_sync.py",
"services/mailu/scripts/mailu_sync_listener.py",
2026-08-17 08:16:35 -03:00
"services/hermes/scripts/cli_lane_board.py",
"services/hermes/scripts/cli_lane_capabilities.py",
"services/hermes/scripts/cli_lane_config.py",
"services/hermes/scripts/cli_lane_dispatch.py",
"services/hermes/scripts/cli_lane_evidence.py",
"services/hermes/scripts/cli_lane_execution.py",
"services/hermes/scripts/cli_lane_failover.py",
2026-08-17 08:16:35 -03:00
"services/hermes/scripts/cli_lane_files.py",
"services/hermes/scripts/cli_lane_finalization.py",
"services/hermes/scripts/cli_lane_goal.py",
"services/hermes/scripts/cli_lane_health.py",
"services/hermes/scripts/cli_lane_metrics.py",
2026-08-17 08:16:35 -03:00
"services/hermes/scripts/cli_lane_prompt.py",
"services/hermes/scripts/cli_lane_provider.py",
"services/hermes/scripts/cli_lane_quarantine.py",
"services/hermes/scripts/cli_lane_quota.py",
2026-08-17 08:16:35 -03:00
"services/hermes/scripts/cli_lane_records.py",
"services/hermes/scripts/cli_lane_recovery.py",
"services/hermes/scripts/cli_lane_retention.py",
"services/hermes/scripts/cli_lane_routing.py",
"services/hermes/scripts/cli_lane_runner.py",
2026-08-18 06:28:49 -03:00
"services/hermes/scripts/kanban_supervisor.py",
"services/hermes/scripts/supervisor_policy.py",
"testing/tests",
"testing",
"services/gitea/scripts/gitea_branch_protection_check.py",
"services/hermes/scm-common/scripts",
"services/hermes/scripts/execution_pool_client.py",
"services/hermes/scripts/execution_pool_coordinator.py",
"services/hermes/scripts/execution_pool_maintenance.py",
"services/hermes/scripts/execution_pool_project.py",
"services/hermes/scripts/execution_pool_protocol.py",
"services/hermes/scripts/execution_pool_scm.py",
"services/hermes/scripts/execution_pool_server.py",
"services/hermes/scripts/execution_pool_store.py",
"services/hermes/scripts/execution_pool_worker.py",
"services/hermes/scripts/hermes_coordinator.py",
"services/hermes/scripts/node_account_audit.py",
"services/hermes/scripts/node_account_hardening.py",
"services/hermes/scripts/node_account_io.py",
"services/hermes/scripts/stage_runtime_access.py",
"services/hermes/scripts/node_polkit_audit.py",
"scripts/ops/hermes_handoff_acceptance.py",
"scripts/ops/hermes_handoff_arming.py",
"scripts/ops/hermes_handoff_catalog.py",
"scripts/ops/hermes_handoff_checks_access.py",
"scripts/ops/hermes_handoff_checks_delivery.py",
"scripts/ops/hermes_handoff_checks_platform.py",
"scripts/ops/hermes_handoff_checks_workers.py",
"scripts/ops/hermes_handoff_ephemeral.py",
"scripts/ops/hermes_handoff_evaluators.py",
"scripts/ops/hermes_handoff_exec.py",
"scripts/ops/hermes_handoff_json_rules.py",
"scripts/ops/hermes_handoff_model.py",
"scripts/ops/hermes_handoff_policy.py",
"scripts/ops/hermes_handoff_redaction.py",
"scripts/ops/hermes_handoff_rules.py",
"scripts/ops/hermes_handoff_run.py",
"dockerfiles/hermes-hux-foundation/hux/__init__.py",
"dockerfiles/hermes-hux-foundation/hux/artifacts.py",
"dockerfiles/hermes-hux-foundation/hux/audit.py",
"dockerfiles/hermes-hux-foundation/hux/budgets.py",
"dockerfiles/hermes-hux-foundation/hux/contracts.py",
"dockerfiles/hermes-hux-foundation/hux/diffs.py",
"dockerfiles/hermes-hux-foundation/hux/errors.py",
"dockerfiles/hermes-hux-foundation/hux/events.py",
"dockerfiles/hermes-hux-foundation/hux/flags.py",
"dockerfiles/hermes-hux-foundation/hux/foundation.py",
"dockerfiles/hermes-hux-foundation/hux/http.py",
"dockerfiles/hermes-hux-foundation/hux/identity.py",
"dockerfiles/hermes-hux-foundation/hux/memory.py",
"dockerfiles/hermes-hux-foundation/hux/modes.py",
"dockerfiles/hermes-hux-foundation/hux/multimodal.py",
"dockerfiles/hermes-hux-foundation/hux/organization.py",
"dockerfiles/hermes-hux-foundation/hux/policy.py",
"dockerfiles/hermes-hux-foundation/hux/privacy.py",
"dockerfiles/hermes-hux-foundation/hux/redaction.py",
"dockerfiles/hermes-hux-foundation/hux/releases.py",
"dockerfiles/hermes-hux-foundation/hux/release_security.py",
"dockerfiles/hermes-hux-foundation/hux/retention_scheduler.py",
"dockerfiles/hermes-hux-foundation/hux/research.py",
"dockerfiles/hermes-hux-foundation/hux/rules.py",
"dockerfiles/hermes-hux-foundation/hux/server.py",
"dockerfiles/hermes-hux-foundation/hux/store.py",
"dockerfiles/hermes-hux-foundation/hux/suggestions.py",
"dockerfiles/hermes-hux-foundation/hux_producer/__init__.py",
"dockerfiles/hermes-worker-hux/hux_hook/__init__.py",
"dockerfiles/hermes-worker-hux/hux_hook/client.py",
"dockerfiles/hermes-worker-hux/hux_hook/hooks.py",
"services/hermes/plugins/auto-router/hux_mode.py",
"services/hermes/plugins/hux-runtime/__init__.py",
"services/hermes/plugins/hux-runtime/context_ids.py",
"services/hermes/plugins/hux-runtime/emitters.py",
"services/hermes/plugins/hux-runtime/runtime.py",
"services/hermes/plugins/hux-runtime/tool_policy.py"
],
"pytest_suites": {
"unit": {
"description": "Fast unit and contract tests for repo automation.",
"paths": [
"scripts/tests",
"services/comms/scripts/tests",
"testing/tests"
],
"junit": "build/junit-unit.xml",
"coverage_sources": [
"ci/scripts",
"dockerfiles",
"scripts.render.dashboards_render_atlas",
"services/harbor/scripts",
"services/hermes/scripts",
"services/mailu/scripts",
"testing",
"services/gitea/scripts",
"services/hermes/scm-common/scripts",
"scripts/ops"
],
"coverage_xml": "build/coverage-unit.xml"
},
"glue": {
"description": "Cluster-live glue checks that validate CronJobs and exported metrics.",
"paths": [
"ci/tests/glue"
],
"junit": "build/junit-glue.xml"
}
},
"profiles": {
"local": [
"docs",
"smell",
"hygiene",
"unit",
"coverage"
],
"jenkins": [
"docs",
"smell",
"hygiene",
"unit",
"coverage",
"sonarqube",
"ironbank",
"glue"
]
},
"manual_scripts": [
{
"path": "scripts/manual-tests/test_atlas_user_cleanup.py",
"description": "Manual cleanup validation for Atlas user lifecycle automation."
},
{
"path": "scripts/manual-tests/test_user_cleanup.py",
"description": "Manual cleanup validation for shared user lifecycle automation."
},
{
"path": "scripts/manual-tests/test_vaultwarden_user_cleanup.py",
"description": "Manual cleanup validation for Vaultwarden user lifecycle automation."
},
{
"path": "services/bstein-dev-home/scripts/test_portal_onboarding_flow.py",
"description": "Portal onboarding end-to-end flow validation with mail delivery checks."
},
{
"path": "services/keycloak/scripts/tests/test_keycloak_execute_actions_email.py",
"description": "Standalone Keycloak SMTP execute-actions-email validation script."
},
{
"path": "services/keycloak/scripts/tests/test_portal_token_exchange.py",
"description": "Standalone Keycloak token-exchange validation script."
}
],
"hygiene": {
"max_lines": 500,
"line_limit_globs": [
"testing/**/*.py",
"ci/scripts/*.py",
"ci/tests/**/*.py",
"scripts/tests/**/*.py",
"services/*/scripts/tests/**/*.py",
2026-08-17 08:16:35 -03:00
"services/hermes/scripts/cli_lane_*.py",
2026-08-18 06:28:49 -03:00
"services/hermes/scripts/kanban_supervisor.py",
"services/hermes/scripts/supervisor_policy.py",
"services/mailu/scripts/mailu_sync.py",
"services/mailu/scripts/mailu_sync_listener.py",
"services/gitea/scripts/gitea_branch_protection_check.py",
"services/hermes/scm-common/scripts/*.py",
"services/hermes/scripts/execution_pool_*.py",
"services/hermes/scripts/hermes_coordinator.py",
"services/hermes/scripts/node_account_audit.py",
"services/hermes/scripts/node_account_hardening.py",
"services/hermes/scripts/node_account_io.py",
"services/hermes/scripts/stage_runtime_access.py",
"services/hermes/scripts/node_polkit_audit.py",
"scripts/ops/hermes_handoff_*.py",
"dockerfiles/hermes-hux-foundation/hux/*.py",
"dockerfiles/hermes-worker-hux/hux_hook/*.py"
],
"naming_rules": [
{
"glob": "testing/*.py",
"pattern": "^(?:__init__|quality_[a-z0-9_]+)\\.py$",
"description": "Top-level testing helpers use quality_* module names."
},
{
"glob": "testing/tests/*.py",
"pattern": "^test_[a-z0-9_]+\\.py$",
"description": "Top-level pytest files use test_*.py names."
},
{
"glob": "ci/tests/**/*.py",
"pattern": "^test_[a-z0-9_]+\\.py$",
"description": "CI pytest files use test_*.py names."
},
{
"glob": "scripts/tests/**/*.py",
"pattern": "^test_[a-z0-9_]+\\.py$",
"description": "Script pytest files use test_*.py names."
},
{
"glob": "scripts/test_*.py",
"pattern": "^test_[a-z0-9_]+\\.py$",
"description": "Standalone script tests use test_*.py names."
},
{
"glob": "services/*/scripts/tests/**/*.py",
"pattern": "^test_[a-z0-9_]+\\.py$",
"description": "Service pytest files use test_*.py names."
},
{
"glob": "services/*/scripts/test_*.py",
"pattern": "^test_[a-z0-9_]+\\.py$",
"description": "Standalone service test scripts use test_*.py names."
}
]
},
"coverage": {
"minimum_percent": 95.0,
"minimum_branch_percent": 95.0,
"branch_tracked_files": [
"services/hermes/scripts/voice_route_preflight.py",
"scripts/ops/hermes_handoff_acceptance.py",
fix(hermes): close the zero-evidence fail-open in absence checks evaluate_names_absent returned PASS when its step exited 0 with no output, so five mandatory checks - the ones asserting that provider API keys, forge credentials, a cluster-admin binding, and shared coordinator state are absent - could report a pass on no evidence and turn a NO_GO into a GO. Both name rules now resolve their step through one guard in _line_step, so zero observations are NOT_RUN. Regressions pin all five real catalog specs plus both reachable silence paths: a POSIX pipeline whose status comes from its last stage, and a drifted kubectl -o jsonpath. The pool claim projection emits one <volume>=<claim> line per template volume so a volume without a PVC still counts as an observation rather than reading as drift. Also closes the review's reachable hardening and evidence defects: - pin Gitea paths to atlas/titan-iac on an exact segment boundary and reject relative segments, including percent-encoded ones - forbid impersonation structurally in every mode and vantage; the inner command of kubectl exec is re-checked rather than exempted, and validate_catalog no longer guards only the operator vantage - drop flux and helm from the binary allowlist; they had no pinned release digest, so no allowlisted binary can now be admitted that the executor would refuse to attest - remove the inert --concurrency and --expect-telegram-sessions flags and the dead concurrency bound; Telegram continuity stays mandatory - read the ephemeral pull index page by page, treat the create response as an authoritative source for the pull number, close every number either source names, and surface residue_ref plus exact manual_cleanup commands when creation is uncertain - keep executable_path and executable_sha256 on unrecorded bulk-evidence steps so withholding bytes never withholds binary attestation - revert the repo-wide hygiene legacy-exception mechanism; the contract change here is purely additive and the four pre-existing over-cap files are left to the canonical contract change in PR #14/#15 - correct the runbook ruff format scope so the documented command passes Split hermes_handoff_arming.py out of hermes_handoff_ephemeral.py to keep both modules under the 500-line cap. All 16 handoff modules hold at least 95% line and branch coverage; the mutation gate is 13/13. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 16:24:37 +00:00
"scripts/ops/hermes_handoff_arming.py",
"scripts/ops/hermes_handoff_catalog.py",
"scripts/ops/hermes_handoff_checks_access.py",
"scripts/ops/hermes_handoff_checks_delivery.py",
"scripts/ops/hermes_handoff_checks_platform.py",
"scripts/ops/hermes_handoff_checks_workers.py",
"scripts/ops/hermes_handoff_ephemeral.py",
"scripts/ops/hermes_handoff_evaluators.py",
"scripts/ops/hermes_handoff_exec.py",
"scripts/ops/hermes_handoff_json_rules.py",
"scripts/ops/hermes_handoff_model.py",
"scripts/ops/hermes_handoff_policy.py",
"scripts/ops/hermes_handoff_redaction.py",
"scripts/ops/hermes_handoff_rules.py",
"scripts/ops/hermes_handoff_run.py",
"ci/scripts/semgrep_report.py",
"testing/quality_coverage.py",
"testing/quality_handoff_mutation.py",
"dockerfiles/hermes-hux-foundation/hux/__init__.py",
"dockerfiles/hermes-hux-foundation/hux/artifacts.py",
"dockerfiles/hermes-hux-foundation/hux/audit.py",
"dockerfiles/hermes-hux-foundation/hux/budgets.py",
"dockerfiles/hermes-hux-foundation/hux/contracts.py",
"dockerfiles/hermes-hux-foundation/hux/diffs.py",
"dockerfiles/hermes-hux-foundation/hux/errors.py",
"dockerfiles/hermes-hux-foundation/hux/events.py",
"dockerfiles/hermes-hux-foundation/hux/flags.py",
"dockerfiles/hermes-hux-foundation/hux/foundation.py",
"dockerfiles/hermes-hux-foundation/hux/http.py",
"dockerfiles/hermes-hux-foundation/hux/identity.py",
"dockerfiles/hermes-hux-foundation/hux/memory.py",
"dockerfiles/hermes-hux-foundation/hux/modes.py",
"dockerfiles/hermes-hux-foundation/hux/multimodal.py",
"dockerfiles/hermes-hux-foundation/hux/organization.py",
"dockerfiles/hermes-hux-foundation/hux/policy.py",
"dockerfiles/hermes-hux-foundation/hux/privacy.py",
"dockerfiles/hermes-hux-foundation/hux/redaction.py",
"dockerfiles/hermes-hux-foundation/hux/releases.py",
"dockerfiles/hermes-hux-foundation/hux/release_security.py",
"dockerfiles/hermes-hux-foundation/hux/retention_scheduler.py",
"dockerfiles/hermes-hux-foundation/hux/research.py",
"dockerfiles/hermes-hux-foundation/hux/rules.py",
"dockerfiles/hermes-hux-foundation/hux/server.py",
"dockerfiles/hermes-hux-foundation/hux/store.py",
"dockerfiles/hermes-hux-foundation/hux/suggestions.py",
"dockerfiles/hermes-hux-foundation/hux_producer/__init__.py",
"dockerfiles/hermes-worker-hux/hux_hook/__init__.py",
"dockerfiles/hermes-worker-hux/hux_hook/client.py",
"dockerfiles/hermes-worker-hux/hux_hook/hooks.py",
"services/hermes/plugins/auto-router/hux_mode.py",
"services/hermes/plugins/hux-runtime/__init__.py",
"services/hermes/plugins/hux-runtime/context_ids.py",
"services/hermes/plugins/hux-runtime/emitters.py",
"services/hermes/plugins/hux-runtime/runtime.py",
"services/hermes/plugins/hux-runtime/tool_policy.py"
],
"tracked_files": [
"services/hermes/scripts/voice_route_preflight.py",
"ci/scripts/hermes_image_release.py",
"dockerfiles/hermes-kaniko-heredoc-runner.py",
"services/harbor/scripts/harbor_hermes_agent_immutability_ensure.py",
"services/hermes/scripts/hermes_image_release_status.py",
"services/hermes/scripts/jenkins_image_build_trigger.py",
"ci/scripts/publish_test_metrics.py",
"ci/scripts/publish_test_metrics_quality.py",
"ci/scripts/semgrep_report.py",
"ci/scripts/supply_chain_report.py",
"services/mailu/scripts/mailu_sync.py",
"services/mailu/scripts/mailu_sync_listener.py",
"services/hermes/scripts/cli_lane_board.py",
"services/hermes/scripts/cli_lane_capabilities.py",
"services/hermes/scripts/cli_lane_config.py",
"services/hermes/scripts/cli_lane_dispatch.py",
"services/hermes/scripts/cli_lane_evidence.py",
"services/hermes/scripts/cli_lane_execution.py",
"services/hermes/scripts/cli_lane_failover.py",
"services/hermes/scripts/cli_lane_files.py",
"services/hermes/scripts/cli_lane_finalization.py",
"services/hermes/scripts/cli_lane_goal.py",
"services/hermes/scripts/cli_lane_health.py",
"services/hermes/scripts/cli_lane_metrics.py",
"services/hermes/scripts/cli_lane_prompt.py",
"services/hermes/scripts/cli_lane_provider.py",
"services/hermes/scripts/cli_lane_quarantine.py",
"services/hermes/scripts/cli_lane_quota.py",
"services/hermes/scripts/cli_lane_records.py",
"services/hermes/scripts/cli_lane_recovery.py",
"services/hermes/scripts/cli_lane_retention.py",
"services/hermes/scripts/cli_lane_routing.py",
"services/hermes/scripts/cli_lane_runner.py",
2026-08-18 06:28:49 -03:00
"services/hermes/scripts/kanban_supervisor.py",
"services/hermes/scripts/supervisor_policy.py",
"testing/quality_contract.py",
"testing/quality_docs.py",
"testing/quality_hygiene.py",
"testing/quality_coverage.py",
"testing/quality_gate.py",
"services/gitea/scripts/gitea_branch_protection_check.py",
"services/hermes/scm-common/scripts/gitea_api.py",
"services/hermes/scm-common/scripts/gitea_api_policy.py",
"services/hermes/scm-common/scripts/scm_broker.py",
"services/hermes/scm-common/scripts/scm_broker_client.py",
"services/hermes/scm-common/scripts/scm_broker_io.py",
"services/hermes/scm-common/scripts/scm_broker_server.py",
"services/hermes/scripts/execution_pool_client.py",
"services/hermes/scripts/execution_pool_coordinator.py",
hermes: make pool lease recovery and release isolation safe Independent review t_5975c06a blocked this branch on a P1: a Kanban write that failed while a lease expired left a `lease_failed` row that was invisible to every pass, immortal to garbage collection, and fatal to the coordinator. It poisoned `reconcile()` forever with a conflicting-duplicate primary key, produced a spurious capability `block_task` from `dispatch()`, and -- because startup maintenance ran unguarded before the port bound, against a store on a PVC -- crash-looped the coordinator with no automatic recovery. `lease_failed` is now a retryable state that every maintenance pass drains, and a row only reaches a terminal state on authoritative evidence about its exact Kanban run, so nothing is collected before its outcome is known and nothing is silently dropped. Each row, task, and board is processed in isolation, and a coordinator-side fault is never converted into a Kanban mutation. Startup runs through the same guarded cycle as the steady-state loop. The wire protocol and the durable store are now separate modules, and the maintenance passes moved out of the coordinator, so each file stays under the managed line ceiling with room for the recovery logic. Also closes three consequential handoff risks the same review raised: * mediator-N pinned itself hard to worker-N while sharing a ReadWriteOnce claim, so a drain or preemption that moved only the lower-priority worker deadlocked the ordinal on Multi-Attach until an operator deleted a Pod. The shared workspace is now ReadWriteMany (as the hermes-chat tenant workspaces already are on the same class), colocation is a preference, and the mediator shares the worker's preemption priority, so each Pod reschedules on its own. * the broker permits only branch creation, so a retry that added commits could never submit and the run's work was discarded with the failure. Submission now targets a fresh attempt- or content-scoped ref in the same reviewed namespace -- never an update -- and is idempotent under replay. A refused submission downgrades the result and says why instead of unwinding the run. * the provider CLIs were reinstalled into an emptyDir on every Pod start inside the 10m Flux health window for the whole hermes app. They now install once per pinned version onto a durable volume, re-verified against the real binaries and time-bounded, and the best-effort pool no longer gates the health of the app its dependents wait on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 16:31:15 +00:00
"services/hermes/scripts/execution_pool_maintenance.py",
"services/hermes/scripts/execution_pool_project.py",
"services/hermes/scripts/execution_pool_protocol.py",
"services/hermes/scripts/execution_pool_scm.py",
"services/hermes/scripts/execution_pool_server.py",
hermes: make pool lease recovery and release isolation safe Independent review t_5975c06a blocked this branch on a P1: a Kanban write that failed while a lease expired left a `lease_failed` row that was invisible to every pass, immortal to garbage collection, and fatal to the coordinator. It poisoned `reconcile()` forever with a conflicting-duplicate primary key, produced a spurious capability `block_task` from `dispatch()`, and -- because startup maintenance ran unguarded before the port bound, against a store on a PVC -- crash-looped the coordinator with no automatic recovery. `lease_failed` is now a retryable state that every maintenance pass drains, and a row only reaches a terminal state on authoritative evidence about its exact Kanban run, so nothing is collected before its outcome is known and nothing is silently dropped. Each row, task, and board is processed in isolation, and a coordinator-side fault is never converted into a Kanban mutation. Startup runs through the same guarded cycle as the steady-state loop. The wire protocol and the durable store are now separate modules, and the maintenance passes moved out of the coordinator, so each file stays under the managed line ceiling with room for the recovery logic. Also closes three consequential handoff risks the same review raised: * mediator-N pinned itself hard to worker-N while sharing a ReadWriteOnce claim, so a drain or preemption that moved only the lower-priority worker deadlocked the ordinal on Multi-Attach until an operator deleted a Pod. The shared workspace is now ReadWriteMany (as the hermes-chat tenant workspaces already are on the same class), colocation is a preference, and the mediator shares the worker's preemption priority, so each Pod reschedules on its own. * the broker permits only branch creation, so a retry that added commits could never submit and the run's work was discarded with the failure. Submission now targets a fresh attempt- or content-scoped ref in the same reviewed namespace -- never an update -- and is idempotent under replay. A refused submission downgrades the result and says why instead of unwinding the run. * the provider CLIs were reinstalled into an emptyDir on every Pod start inside the 10m Flux health window for the whole hermes app. They now install once per pinned version onto a durable volume, re-verified against the real binaries and time-bounded, and the best-effort pool no longer gates the health of the app its dependents wait on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 16:31:15 +00:00
"services/hermes/scripts/execution_pool_store.py",
"services/hermes/scripts/execution_pool_worker.py",
"services/hermes/scripts/hermes_coordinator.py",
"services/hermes/scripts/node_account_audit.py",
"services/hermes/scripts/node_account_hardening.py",
"services/hermes/scripts/node_account_io.py",
"services/hermes/scripts/stage_runtime_access.py",
"services/hermes/scm-common/scripts/deadline_http.py",
"services/hermes/scm-common/scripts/git_pack_objects.py",
"services/hermes/scm-common/scripts/receive_pack_scan.py",
"services/hermes/scripts/node_polkit_audit.py",
"scripts/ops/hermes_handoff_acceptance.py",
fix(hermes): close the zero-evidence fail-open in absence checks evaluate_names_absent returned PASS when its step exited 0 with no output, so five mandatory checks - the ones asserting that provider API keys, forge credentials, a cluster-admin binding, and shared coordinator state are absent - could report a pass on no evidence and turn a NO_GO into a GO. Both name rules now resolve their step through one guard in _line_step, so zero observations are NOT_RUN. Regressions pin all five real catalog specs plus both reachable silence paths: a POSIX pipeline whose status comes from its last stage, and a drifted kubectl -o jsonpath. The pool claim projection emits one <volume>=<claim> line per template volume so a volume without a PVC still counts as an observation rather than reading as drift. Also closes the review's reachable hardening and evidence defects: - pin Gitea paths to atlas/titan-iac on an exact segment boundary and reject relative segments, including percent-encoded ones - forbid impersonation structurally in every mode and vantage; the inner command of kubectl exec is re-checked rather than exempted, and validate_catalog no longer guards only the operator vantage - drop flux and helm from the binary allowlist; they had no pinned release digest, so no allowlisted binary can now be admitted that the executor would refuse to attest - remove the inert --concurrency and --expect-telegram-sessions flags and the dead concurrency bound; Telegram continuity stays mandatory - read the ephemeral pull index page by page, treat the create response as an authoritative source for the pull number, close every number either source names, and surface residue_ref plus exact manual_cleanup commands when creation is uncertain - keep executable_path and executable_sha256 on unrecorded bulk-evidence steps so withholding bytes never withholds binary attestation - revert the repo-wide hygiene legacy-exception mechanism; the contract change here is purely additive and the four pre-existing over-cap files are left to the canonical contract change in PR #14/#15 - correct the runbook ruff format scope so the documented command passes Split hermes_handoff_arming.py out of hermes_handoff_ephemeral.py to keep both modules under the 500-line cap. All 16 handoff modules hold at least 95% line and branch coverage; the mutation gate is 13/13. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 16:24:37 +00:00
"scripts/ops/hermes_handoff_arming.py",
"scripts/ops/hermes_handoff_catalog.py",
"scripts/ops/hermes_handoff_checks_access.py",
"scripts/ops/hermes_handoff_checks_delivery.py",
"scripts/ops/hermes_handoff_checks_platform.py",
"scripts/ops/hermes_handoff_checks_workers.py",
"scripts/ops/hermes_handoff_ephemeral.py",
"scripts/ops/hermes_handoff_evaluators.py",
"scripts/ops/hermes_handoff_exec.py",
"scripts/ops/hermes_handoff_json_rules.py",
"scripts/ops/hermes_handoff_model.py",
"scripts/ops/hermes_handoff_policy.py",
"scripts/ops/hermes_handoff_redaction.py",
"scripts/ops/hermes_handoff_rules.py",
"scripts/ops/hermes_handoff_run.py",
"testing/quality_handoff_mutation.py",
"dockerfiles/hermes-hux-foundation/hux/__init__.py",
"dockerfiles/hermes-hux-foundation/hux/artifacts.py",
"dockerfiles/hermes-hux-foundation/hux/audit.py",
"dockerfiles/hermes-hux-foundation/hux/budgets.py",
"dockerfiles/hermes-hux-foundation/hux/contracts.py",
"dockerfiles/hermes-hux-foundation/hux/diffs.py",
"dockerfiles/hermes-hux-foundation/hux/errors.py",
"dockerfiles/hermes-hux-foundation/hux/events.py",
"dockerfiles/hermes-hux-foundation/hux/flags.py",
"dockerfiles/hermes-hux-foundation/hux/foundation.py",
"dockerfiles/hermes-hux-foundation/hux/http.py",
"dockerfiles/hermes-hux-foundation/hux/identity.py",
"dockerfiles/hermes-hux-foundation/hux/memory.py",
"dockerfiles/hermes-hux-foundation/hux/modes.py",
"dockerfiles/hermes-hux-foundation/hux/multimodal.py",
"dockerfiles/hermes-hux-foundation/hux/organization.py",
"dockerfiles/hermes-hux-foundation/hux/policy.py",
"dockerfiles/hermes-hux-foundation/hux/privacy.py",
"dockerfiles/hermes-hux-foundation/hux/redaction.py",
"dockerfiles/hermes-hux-foundation/hux/releases.py",
"dockerfiles/hermes-hux-foundation/hux/release_security.py",
"dockerfiles/hermes-hux-foundation/hux/retention_scheduler.py",
"dockerfiles/hermes-hux-foundation/hux/research.py",
"dockerfiles/hermes-hux-foundation/hux/rules.py",
"dockerfiles/hermes-hux-foundation/hux/server.py",
"dockerfiles/hermes-hux-foundation/hux/store.py",
"dockerfiles/hermes-hux-foundation/hux/suggestions.py",
"dockerfiles/hermes-hux-foundation/hux_producer/__init__.py",
"dockerfiles/hermes-worker-hux/hux_hook/__init__.py",
"dockerfiles/hermes-worker-hux/hux_hook/client.py",
"dockerfiles/hermes-worker-hux/hux_hook/hooks.py",
"services/hermes/plugins/auto-router/hux_mode.py",
"services/hermes/plugins/hux-runtime/__init__.py",
"services/hermes/plugins/hux-runtime/context_ids.py",
"services/hermes/plugins/hux-runtime/emitters.py",
"services/hermes/plugins/hux-runtime/runtime.py",
"services/hermes/plugins/hux-runtime/tool_policy.py"
]
}
}