agent-control-plane 0.1.6 → 0.1.8

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.
@@ -13,13 +13,14 @@ Run the main smoke gates for the shared agent-control-plane package in one comma
13
13
 
14
14
  Steps:
15
15
  1. check-skill-contracts.sh
16
- 2. tools/tests/test-profile-smoke.sh
17
- 3. tools/tests/test-project-runtimectl.sh
16
+ 2. profile-smoke.sh against a temporary scaffolded profile registry
17
+ 3. project-runtimectl.sh status against a temporary scaffolded profile
18
18
 
19
19
  Environment overrides:
20
20
  ACP_TEST_SMOKE_CHECK_CONTRACTS_SCRIPT
21
- ACP_TEST_SMOKE_PROFILE_TEST_SCRIPT
22
- ACP_TEST_SMOKE_RUNTIMECTL_TEST_SCRIPT
21
+ ACP_TEST_SMOKE_PROFILE_SMOKE_SCRIPT
22
+ ACP_TEST_SMOKE_RUNTIMECTL_SCRIPT
23
+ ACP_TEST_SMOKE_SCAFFOLD_PROFILE_SCRIPT
23
24
  EOF
24
25
  }
25
26
 
@@ -31,8 +32,9 @@ while [[ $# -gt 0 ]]; do
31
32
  done
32
33
 
33
34
  check_contracts_script="${ACP_TEST_SMOKE_CHECK_CONTRACTS_SCRIPT:-${FLOW_SKILL_DIR}/tools/bin/check-skill-contracts.sh}"
34
- profile_test_script="${ACP_TEST_SMOKE_PROFILE_TEST_SCRIPT:-${FLOW_SKILL_DIR}/tools/tests/test-profile-smoke.sh}"
35
- runtimectl_test_script="${ACP_TEST_SMOKE_RUNTIMECTL_TEST_SCRIPT:-${FLOW_SKILL_DIR}/tools/tests/test-project-runtimectl.sh}"
35
+ profile_smoke_script="${ACP_TEST_SMOKE_PROFILE_SMOKE_SCRIPT:-${FLOW_SKILL_DIR}/tools/bin/profile-smoke.sh}"
36
+ runtimectl_script="${ACP_TEST_SMOKE_RUNTIMECTL_SCRIPT:-${FLOW_SKILL_DIR}/tools/bin/project-runtimectl.sh}"
37
+ scaffold_profile_script="${ACP_TEST_SMOKE_SCAFFOLD_PROFILE_SCRIPT:-${FLOW_SKILL_DIR}/tools/bin/scaffold-profile.sh}"
36
38
 
37
39
  run_step() {
38
40
  local label="${1:?label required}"
@@ -57,7 +59,56 @@ run_step() {
57
59
  }
58
60
 
59
61
  run_step "check-skill-contracts" bash "${check_contracts_script}"
60
- run_step "test-profile-smoke" bash "${profile_test_script}"
61
- run_step "test-project-runtimectl" bash "${runtimectl_test_script}"
62
+
63
+ run_profile_smoke_fixture() (
64
+ set -euo pipefail
65
+ local tmpdir=""
66
+ local profile_home=""
67
+
68
+ tmpdir="$(mktemp -d)"
69
+ trap 'rm -rf "${tmpdir}"' EXIT
70
+ profile_home="${tmpdir}/profiles"
71
+
72
+ bash "${scaffold_profile_script}" \
73
+ --profile-home "${profile_home}" \
74
+ --profile-id smoke-alpha \
75
+ --repo-slug example/smoke-alpha >/dev/null
76
+
77
+ ACP_PROFILE_REGISTRY_ROOT="${profile_home}" \
78
+ bash "${profile_smoke_script}" --profile-id smoke-alpha >/dev/null
79
+ )
80
+
81
+ run_runtimectl_fixture() (
82
+ set -euo pipefail
83
+ local tmpdir=""
84
+ local profile_home=""
85
+ local runtime_root=""
86
+ local profile_id="smoke-runtime"
87
+ local output=""
88
+
89
+ tmpdir="$(mktemp -d)"
90
+ trap 'rm -rf "${tmpdir}"' EXIT
91
+ profile_home="${tmpdir}/profiles"
92
+ runtime_root="${tmpdir}/runtime/${profile_id}"
93
+
94
+ bash "${scaffold_profile_script}" \
95
+ --profile-home "${profile_home}" \
96
+ --profile-id "${profile_id}" \
97
+ --repo-slug example/${profile_id} \
98
+ --agent-root "${runtime_root}" \
99
+ --agent-repo-root "${runtime_root}/repo" \
100
+ --worktree-root "${runtime_root}/worktrees" >/dev/null
101
+
102
+ output="$(
103
+ ACP_PROFILE_REGISTRY_ROOT="${profile_home}" \
104
+ bash "${runtimectl_script}" status --profile-id "${profile_id}"
105
+ )"
106
+
107
+ grep -q "^PROFILE_ID=${profile_id}\$" <<<"${output}"
108
+ grep -q '^RUNTIME_STATUS=' <<<"${output}"
109
+ )
110
+
111
+ run_step "profile-smoke" run_profile_smoke_fixture
112
+ run_step "project-runtimectl" run_runtimectl_fixture
62
113
 
63
114
  printf 'SMOKE_TEST_STATUS=ok\n'