66 lines
3.4 KiB
JSON
66 lines
3.4 KiB
JSON
{
|
|
"task_id": "TEST-COVERAGE-POLICIES-001",
|
|
"plan_ref": "agent-system/runs/TEST-COVERAGE-POLICIES-001/plan.json",
|
|
"status": "done",
|
|
"changed_files": [
|
|
{
|
|
"path": "tests/Service/Access/OperationsAuthorizationPolicyTest.php",
|
|
"summary": "CREATED — S2: 17 tests covering supports() (known + unknown abilities), authorize() with zero/negative/missing actor_user_id, unsupported ability (500), allowIfHas pattern (5 tests across different abilities), authorizeUsersCreateCustomFields compound AND logic (3 tests), authorizeApiTokensSelfManage OR logic (3 tests). Uses AuthorizationPolicyTestSupport trait."
|
|
}
|
|
],
|
|
"guard_evidence": [
|
|
{
|
|
"guard_id": "GR-TEST-001",
|
|
"status": "pass",
|
|
"evidence": "17 test methods covering every public method (supports, authorize) with allowed + denied scenarios for all 3 authorization paths (allowIfHas, authorizeUsersCreateCustomFields, authorizeApiTokensSelfManage)."
|
|
},
|
|
{
|
|
"guard_id": "GR-TEST-002",
|
|
"status": "pass",
|
|
"evidence": "Edge cases covered: zero actor_user_id, negative actor_user_id, missing actor_user_id, unsupported ability, missing both compound permissions, missing one of two required permissions, OR-logic with only first permission, OR-logic with only second permission."
|
|
},
|
|
{
|
|
"guard_id": "GR-CORE-005",
|
|
"status": "pass",
|
|
"evidence": "OperationsAuthorizationPolicy follows the same pattern as the 6 existing tested policies: constructor-injected PermissionService, supports() + authorize() public interface, returns AuthorizationDecision. Test uses identical mock pattern (permissionGatewayAllowing)."
|
|
},
|
|
{
|
|
"guard_id": "GR-LANG-001",
|
|
"status": "pass",
|
|
"evidence": "Test file follows PSR-4 namespace (MintyPHP\\Tests\\Service\\Access). CS Fixer reports 0 of 532 files need fixing."
|
|
},
|
|
{
|
|
"guard_id": "GR-LANG-002",
|
|
"status": "pass",
|
|
"evidence": "PHPStan level 5: 0 new errors. 4 pre-existing errors in AuthzUiContractTest.php — verified pre-existing in prior tasks."
|
|
}
|
|
],
|
|
"commands": [
|
|
{ "cmd": "docker compose exec php vendor/bin/phpunit tests/Service/Access/ --no-coverage", "result": "pass" },
|
|
{ "cmd": "docker compose exec php vendor/bin/phpstan analyse -c phpstan.neon --no-progress", "result": "pass" },
|
|
{ "cmd": "docker compose exec php vendor/bin/php-cs-fixer fix --dry-run --config=.php-cs-fixer.dist.php", "result": "pass" }
|
|
],
|
|
"quality_gate_results": [
|
|
{
|
|
"gate_id": "QG-001",
|
|
"result": "pass",
|
|
"notes": "93 tests in tests/Service/Access/ — all green. 17 new tests added for OperationsAuthorizationPolicy. All 7 policy test files pass (100% policy test coverage). 1 pre-existing failure (TranslationKeysTest) out of scope. This task introduced zero test failures."
|
|
},
|
|
{
|
|
"gate_id": "QG-002",
|
|
"result": "pass",
|
|
"notes": "0 new PHPStan errors. 4 pre-existing errors in AuthzUiContractTest.php — verified pre-existing in prior tasks. This task introduced zero PHPStan errors."
|
|
},
|
|
{
|
|
"gate_id": "QG-006",
|
|
"result": "pass",
|
|
"notes": "php-cs-fixer fix --dry-run: 0 of 532 files need fixing."
|
|
}
|
|
],
|
|
"test_results": [
|
|
{ "name": "tests/Service/Access/OperationsAuthorizationPolicyTest.php", "result": "pass", "count": 17 },
|
|
{ "name": "tests/Service/Access/ (all 7 policy files)", "result": "pass", "count": 93 }
|
|
],
|
|
"open_items": []
|
|
}
|