@elvis1513/auto-coding-skill 4.3.3 → 4.3.4

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.
@@ -4,6 +4,7 @@ from __future__ import annotations
4
4
  import hashlib
5
5
  import json
6
6
  import os
7
+ import shutil
7
8
  import subprocess
8
9
  import sys
9
10
  import tempfile
@@ -180,6 +181,52 @@ class AutoCodingConcurrencyTests(unittest.TestCase):
180
181
  check=check,
181
182
  )
182
183
 
184
+ def ap_script(
185
+ self,
186
+ repo: Path,
187
+ script: Path,
188
+ *args: str,
189
+ check: bool = True,
190
+ ) -> subprocess.CompletedProcess[str]:
191
+ return command(
192
+ repo,
193
+ sys.executable,
194
+ str(script),
195
+ "--repo",
196
+ str(repo),
197
+ *args,
198
+ check=check,
199
+ )
200
+
201
+ def managed_runtime(self, root: Path) -> Path:
202
+ install_root = root / "managed-runtime"
203
+ skill = install_root / ".agents" / "skills" / "auto-coding-skill"
204
+ shutil.copytree(REPO_ROOT / "src" / "auto-coding-skill", skill)
205
+ script = skill / "scripts" / "ap.py"
206
+ relative = ".agents/skills/auto-coding-skill/scripts/ap.py"
207
+ manifest = {
208
+ "schema_version": 1,
209
+ "skill_version": "4.3.4",
210
+ "manifest_path": ".agents/managed-install.json",
211
+ "entries": [
212
+ {
213
+ "path": relative,
214
+ "source": "skill/scripts/ap.py",
215
+ "ownership": "exact",
216
+ "sha256": hashlib.sha256(script.read_bytes()).hexdigest(),
217
+ "executable": bool(script.stat().st_mode & 0o111),
218
+ "scope": "shared",
219
+ "version": "4.3.4",
220
+ }
221
+ ],
222
+ "managed_namespaces": [],
223
+ "preserved": [],
224
+ }
225
+ manifest_path = install_root / ".agents" / "managed-install.json"
226
+ manifest_path.parent.mkdir(parents=True, exist_ok=True)
227
+ manifest_path.write_text(json.dumps(manifest) + "\n", encoding="utf-8")
228
+ return script
229
+
183
230
  def approve_task(self, repo: Path, task_id: str) -> str:
184
231
  issued = json.loads(
185
232
  self.ap(
@@ -216,7 +263,12 @@ class AutoCodingConcurrencyTests(unittest.TestCase):
216
263
  self.approve_task(repo, task_id)
217
264
  return self.ap(repo, "commit-push", task_id, "--msg", message)
218
265
 
219
- def artifact_reviewer_runner(self, root: Path, *tokens: str) -> str:
266
+ def artifact_reviewer_runner(
267
+ self,
268
+ root: Path,
269
+ *tokens: str,
270
+ runtime_script: Path = AP_SCRIPT,
271
+ ) -> str:
220
272
  fake_reviewer = root / "fake-artifact-reviewer.py"
221
273
  fake_reviewer.write_text(
222
274
  "import hashlib, json, os, pathlib, subprocess, sys\n"
@@ -249,7 +301,7 @@ class AutoCodingConcurrencyTests(unittest.TestCase):
249
301
  "'evidence': ['diff_artifact_sha256=' + actual]}))\n",
250
302
  encoding="utf-8",
251
303
  )
252
- return json.dumps([sys.executable, str(fake_reviewer), str(AP_SCRIPT), *tokens])
304
+ return json.dumps([sys.executable, str(fake_reviewer), str(runtime_script), *tokens])
253
305
 
254
306
  def task_worktree(self, repo: Path, task_id: str) -> Path:
255
307
  wanted = f"refs/heads/codex/{task_id}"
@@ -1553,6 +1605,167 @@ class AutoCodingConcurrencyTests(unittest.TestCase):
1553
1605
  self.assertNotEqual(0, bypass.returncode)
1554
1606
  self.assertIn("allowed only after", bypass.stdout + bypass.stderr)
1555
1607
 
1608
+ def test_known_432_artifact_access_block_gets_one_immutable_managed_retry(self) -> None:
1609
+ root, repo, _ = self.make_repo()
1610
+ managed_script = self.managed_runtime(root)
1611
+ worktree = self.start_task(repo, "REVIEW-MANAGED-RETRY", "shared.txt")
1612
+ (worktree / "shared.txt").write_text("managed retry payload\n", encoding="utf-8")
1613
+ common_dir = Path(git_output(repo, "rev-parse", "--git-common-dir"))
1614
+ if not common_dir.is_absolute():
1615
+ common_dir = (repo / common_dir).resolve()
1616
+ state_root = common_dir / "auto-coding-skill"
1617
+ blocked_reviewer = root / "known-artifact-access-block.py"
1618
+ blocked_reviewer.write_text(
1619
+ "import json\n"
1620
+ f"state_root = {str(state_root)!r}\n"
1621
+ "print(json.dumps({"
1622
+ "'verdict': 'blocked', "
1623
+ "'summary': 'Review could not begin because review-artifact failed before emitting the immutable patch.', "
1624
+ "'evidence': ['review-artifact exited 2: Cannot protect Git-local review storage at ' + state_root + ': Operation not permitted.'], "
1625
+ "'risks': ['The immutable patch was not emitted or substantively reviewed.']}))\n",
1626
+ encoding="utf-8",
1627
+ )
1628
+ blocked = self.ap(
1629
+ worktree,
1630
+ "review-run",
1631
+ "REVIEW-MANAGED-RETRY",
1632
+ "--reviewer",
1633
+ "managed-retry-reviewer",
1634
+ "--runner-command-json",
1635
+ json.dumps([sys.executable, str(blocked_reviewer)]),
1636
+ check=False,
1637
+ )
1638
+ self.assertNotEqual(0, blocked.returncode)
1639
+ manifest_path = self.registry_manifest_path(repo, "REVIEW-MANAGED-RETRY")
1640
+ manifest = json.loads(manifest_path.read_text(encoding="utf-8"))
1641
+ manifest["skill_version"] = "4.3.2"
1642
+ manifest_path.write_text(json.dumps(manifest, indent=2) + "\n", encoding="utf-8")
1643
+ prior_review = manifest["review"]
1644
+ prior_paths = [
1645
+ Path(prior_review["assignment_path"]),
1646
+ Path(prior_review["diff_artifact_path"]),
1647
+ Path(prior_review["runtime_result_path"]),
1648
+ Path(prior_review["runtime_receipt_path"]),
1649
+ Path(prior_review["runtime_event_log_path"]),
1650
+ ]
1651
+ prior_bytes = {path: path.read_bytes() for path in prior_paths}
1652
+ fingerprint = prior_review["diff_fingerprint"]
1653
+
1654
+ authorized = json.loads(
1655
+ self.ap_script(
1656
+ worktree,
1657
+ managed_script,
1658
+ "review-runtime-retry",
1659
+ "REVIEW-MANAGED-RETRY",
1660
+ "--diff-fingerprint",
1661
+ fingerprint,
1662
+ "--reason-code",
1663
+ "managed-review-artifact-access",
1664
+ "--confirm-managed-runtime-retry",
1665
+ "--json",
1666
+ ).stdout
1667
+ )
1668
+ self.assertEqual("retry-authorized", authorized["status"])
1669
+ self.assertEqual("retry-v4.3.4", authorized["retry_token"])
1670
+ audit_path = Path(authorized["audit_path"])
1671
+ self.assertEqual(0o600, audit_path.stat().st_mode & 0o777)
1672
+ audit = json.loads(audit_path.read_text(encoding="utf-8"))
1673
+ self.assertEqual("4.3.2", audit["task_skill_version"])
1674
+ self.assertEqual(hashlib.sha256(prior_bytes[prior_paths[2]]).hexdigest(), audit["prior_result_sha256"])
1675
+
1676
+ runner = self.artifact_reviewer_runner(
1677
+ root,
1678
+ "managed retry payload",
1679
+ runtime_script=managed_script,
1680
+ )
1681
+ reviewed = json.loads(
1682
+ self.ap_script(
1683
+ worktree,
1684
+ managed_script,
1685
+ "review-run",
1686
+ "REVIEW-MANAGED-RETRY",
1687
+ "--reviewer",
1688
+ "managed-retry-reviewer",
1689
+ "--runner-command-json",
1690
+ runner,
1691
+ "--json",
1692
+ ).stdout
1693
+ )
1694
+ self.assertEqual("approved", reviewed["verdict"])
1695
+ for path, original in prior_bytes.items():
1696
+ self.assertEqual(original, path.read_bytes(), str(path))
1697
+ status = json.loads(
1698
+ self.ap_script(
1699
+ worktree,
1700
+ managed_script,
1701
+ "task-status",
1702
+ "REVIEW-MANAGED-RETRY",
1703
+ "--json",
1704
+ ).stdout
1705
+ )["tasks"][0]
1706
+ retry_review = status["review"]
1707
+ self.assertEqual("approved", retry_review["verdict"])
1708
+ self.assertIn(".retry-v4.3.4.result.json", retry_review["runtime_result_path"])
1709
+ retry_receipt = json.loads(Path(retry_review["runtime_receipt_path"]).read_text())
1710
+ self.assertEqual("retry-v4.3.4", retry_receipt["runtime_retry_token"])
1711
+ self.assertEqual(authorized["audit_sha256"], retry_receipt["runtime_retry_audit_sha256"])
1712
+
1713
+ repeated = self.ap_script(
1714
+ worktree,
1715
+ managed_script,
1716
+ "review-runtime-retry",
1717
+ "REVIEW-MANAGED-RETRY",
1718
+ "--diff-fingerprint",
1719
+ fingerprint,
1720
+ "--reason-code",
1721
+ "managed-review-artifact-access",
1722
+ "--confirm-managed-runtime-retry",
1723
+ check=False,
1724
+ )
1725
+ self.assertNotEqual(0, repeated.returncode)
1726
+
1727
+ def test_managed_retry_rejects_a_substantive_blocked_result(self) -> None:
1728
+ root, repo, _ = self.make_repo()
1729
+ managed_script = self.managed_runtime(root)
1730
+ worktree = self.start_task(repo, "REVIEW-RETRY-FINDING", "shared.txt")
1731
+ (worktree / "shared.txt").write_text("substantive retry rejection\n", encoding="utf-8")
1732
+ reviewer = root / "substantive-block.py"
1733
+ reviewer.write_text(
1734
+ "import json\n"
1735
+ "print(json.dumps({'verdict': 'blocked', 'summary': 'real correctness defect', "
1736
+ "'findings': ['P1: incorrect authorization check'], "
1737
+ "'risks': ['Production authorization can be bypassed.']}))\n",
1738
+ encoding="utf-8",
1739
+ )
1740
+ self.ap(
1741
+ worktree,
1742
+ "review-run",
1743
+ "REVIEW-RETRY-FINDING",
1744
+ "--reviewer",
1745
+ "finding-reviewer",
1746
+ "--runner-command-json",
1747
+ json.dumps([sys.executable, str(reviewer)]),
1748
+ check=False,
1749
+ )
1750
+ manifest_path = self.registry_manifest_path(repo, "REVIEW-RETRY-FINDING")
1751
+ manifest = json.loads(manifest_path.read_text(encoding="utf-8"))
1752
+ manifest["skill_version"] = "4.3.2"
1753
+ manifest_path.write_text(json.dumps(manifest, indent=2) + "\n", encoding="utf-8")
1754
+ rejected = self.ap_script(
1755
+ worktree,
1756
+ managed_script,
1757
+ "review-runtime-retry",
1758
+ "REVIEW-RETRY-FINDING",
1759
+ "--diff-fingerprint",
1760
+ manifest["review"]["diff_fingerprint"],
1761
+ "--reason-code",
1762
+ "managed-review-artifact-access",
1763
+ "--confirm-managed-runtime-retry",
1764
+ check=False,
1765
+ )
1766
+ self.assertNotEqual(0, rejected.returncode)
1767
+ self.assertIn("not the exact non-substantive", rejected.stdout + rejected.stderr)
1768
+
1556
1769
  def test_review_run_retries_runtime_unavailable_and_allows_bound_user_override(self) -> None:
1557
1770
  root, repo, _ = self.make_repo()
1558
1771
  worktree = self.start_task(repo, "REVIEW-TIMEOUT", "shared.txt")
@@ -87,7 +87,7 @@ class ProjectConfigResolverTests(unittest.TestCase):
87
87
  (self.repo / "docs" / "project").mkdir(parents=True)
88
88
  self.write_managed(
89
89
  """workflow:
90
- skill_version: "4.3.3"
90
+ skill_version: "4.3.4"
91
91
  mode: dev
92
92
  profile: auto
93
93
  completion: push
@@ -130,7 +130,7 @@ access:
130
130
  effective = core.load_effective_config(self.repo)
131
131
 
132
132
  self.assertEqual("sample", effective["project"]["name"])
133
- self.assertEqual("4.3.3", effective["workflow"]["skill_version"])
133
+ self.assertEqual("4.3.4", effective["workflow"]["skill_version"])
134
134
  self.assertEqual(self.repo / "docs" / "ENGINEERING.md", core.find_config(self.repo))
135
135
  self.assertEqual({}, core.load_project_overrides(self.repo))
136
136
 
@@ -153,7 +153,7 @@ access:
153
153
 
154
154
  effective = core.load_effective_config(self.repo)
155
155
 
156
- self.assertEqual("4.3.3", effective["workflow"]["skill_version"])
156
+ self.assertEqual("4.3.4", effective["workflow"]["skill_version"])
157
157
  self.assertEqual("dev", effective["workflow"]["mode"])
158
158
  self.assertEqual("project-profile", effective["workflow"]["profile"])
159
159
  self.assertEqual("push", effective["workflow"]["completion"])
@@ -292,11 +292,11 @@ access:
292
292
 
293
293
  def test_large_managed_body_is_not_part_of_frontmatter_bound(self) -> None:
294
294
  self.write_managed(
295
- 'workflow:\n skill_version: "4.3.3"\n',
295
+ 'workflow:\n skill_version: "4.3.4"\n',
296
296
  body="x" * (core.MANAGED_CONFIG_FRONTMATTER_MAX_BYTES + 1),
297
297
  )
298
298
 
299
- self.assertEqual("4.3.3", core.load_effective_config(self.repo)["workflow"]["skill_version"])
299
+ self.assertEqual("4.3.4", core.load_effective_config(self.repo)["workflow"]["skill_version"])
300
300
 
301
301
  def test_yaml_failure_does_not_echo_content_or_absolute_path(self) -> None:
302
302
  secret = "NEVER_ECHO_THIS_SECRET"
@@ -422,8 +422,8 @@ function testInitFullyConvergesExistingProject() {
422
422
  }
423
423
  assert(exists(path.join(repo, ".agents", "agents", "custom.toml")), "project-owned custom agents must survive init");
424
424
  assert(!exists(path.join(repo, ".agents", "skills", "auto-coding-skill", "obsolete.txt")), "extra Skill files must be removed");
425
- assert(exists(path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.3", "docs", "legacy", "old-taskbook.md")), "removed docs must be archived outside active docs");
426
- assert(exists(path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.3", "docs", "legacy", "orphan.bin")), "unowned legacy binary assets must still be archived");
425
+ assert(exists(path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.4", "docs", "legacy", "old-taskbook.md")), "removed docs must be archived outside active docs");
426
+ assert(exists(path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.4", "docs", "legacy", "orphan.bin")), "unowned legacy binary assets must still be archived");
427
427
  assert(fs.readFileSync(structureStandard, "utf8") === customStructureStandard, "init must preserve a project-owned structure standard");
428
428
  assert(fs.readFileSync(path.join(repo, "docs", "architecture", "adr", "0042-project-choice.md"), "utf8").includes("Keep me"), "numbered ADR artifacts must survive init");
429
429
  assert(fs.readFileSync(path.join(repo, "docs", "architecture", "system-context.md"), "utf8").includes("Keep me"), "architecture artifacts must survive init");
@@ -538,12 +538,12 @@ function testManagedPolicySummaryPreservesProjectConfiguration() {
538
538
  const legacySummary = "- `structure` and `optimization`: advisory architecture and no-new-debt policy.";
539
539
  const installedOldDefault = current
540
540
  .replace(/^ skill_version:.*$/m, " skill_version: 4.2.5")
541
- .replace("managed-workflow:start version=4.3.3", "managed-workflow:start version=4.2.5")
541
+ .replace("managed-workflow:start version=4.3.4", "managed-workflow:start version=4.2.5")
542
542
  .replace(neutralSummary, legacySummary);
543
543
  installTrustedEngineeringDefault(repo, installedOldDefault, "4.2.5");
544
544
  const customized = current
545
545
  .replace(/^ skill_version:.*$/m, " skill_version: 4.2.5")
546
- .replace("managed-workflow:start version=4.3.3", "managed-workflow:start version=4.2.5")
546
+ .replace("managed-workflow:start version=4.3.4", "managed-workflow:start version=4.2.5")
547
547
  .replace(neutralSummary, legacySummary)
548
548
  .replace(/^ enforcement:.*$/m, " enforcement: blocking")
549
549
  .replace(" block_warnings: false", " block_warnings: true")
@@ -562,7 +562,7 @@ function testManagedPolicySummaryPreservesProjectConfiguration() {
562
562
  const upgraded = fs.readFileSync(engineering, "utf8");
563
563
  const managedAfterUpgrade = readEngineeringConfig(engineering);
564
564
  const afterUpgrade = readEffectiveConfig(repo);
565
- assert(managedAfterUpgrade.workflow?.skill_version === "4.3.3", "init must upgrade the managed workflow version");
565
+ assert(managedAfterUpgrade.workflow?.skill_version === "4.3.4", "init must upgrade the managed workflow version");
566
566
  assert(canonicalJson(afterUpgrade.structure) === canonicalJson(beforeUpgrade.structure), "init must preserve the complete project structure policy");
567
567
  assert(canonicalJson(afterUpgrade.optimization) === canonicalJson(beforeUpgrade.optimization), "init must preserve the complete project optimization policy");
568
568
  assert(upgraded.includes(neutralSummary), "upgraded managed text must defer to frontmatter policy");
@@ -639,12 +639,13 @@ function testMinimalInitConvergesWithinBudget() {
639
639
  const lines = files.reduce((total, file) => total + fs.readFileSync(file, "utf8").split(/\r?\n/).length, 0);
640
640
  assert(files.length <= 40, `minimal scaffold file budget exceeded: ${files.length}`);
641
641
  // Integrity, staging, fail-closed classification, immutable Reviewer snapshots,
642
- // bounded runtime supervision, failure-evidence binding, contract helpers,
642
+ // bounded runtime supervision, failure-evidence binding, immutable one-shot
643
+ // Reviewer migration audits, contract helpers,
643
644
  // effective-config overlay parsing/migration, release-aware metadata-only
644
645
  // feedback lifecycle collection, and the language-aware structure scanner are executable
645
646
  // support code, not prompt context. Keep a measured ceiling while leaving
646
647
  // safety checks readable.
647
- assert(lines <= 20500, `minimal scaffold line budget exceeded: ${lines}`);
648
+ assert(lines <= 21250, `minimal scaffold line budget exceeded: ${lines}`);
648
649
  const engineering = fs.readFileSync(path.join(repo, "docs", "ENGINEERING.md"), "utf8");
649
650
  const managedConfig = readEngineeringConfig(path.join(repo, "docs", "ENGINEERING.md"));
650
651
  assert(managedConfig.workflow?.profile === "auto", "engineering should enable adaptive profiles");
@@ -1213,7 +1214,7 @@ function testTamperedInstalledDefaultRejectsInitAndSyncWithoutWrites() {
1213
1214
  const skill = path.join(repo, ".agents", "skills", "auto-coding-skill", "SKILL.md");
1214
1215
  const oldDefault = fs.readFileSync(engineering, "utf8")
1215
1216
  .replace(/^ skill_version:.*$/m, ' skill_version: "4.2.7"')
1216
- .replace("managed-workflow:start version=4.3.3", "managed-workflow:start version=4.2.7");
1217
+ .replace("managed-workflow:start version=4.3.4", "managed-workflow:start version=4.2.7");
1217
1218
  installTrustedEngineeringDefault(repo, oldDefault, "4.2.7");
1218
1219
  writeFile(engineering, oldDefault);
1219
1220
  fs.unlinkSync(overlay);
@@ -1502,7 +1503,7 @@ function testArchiveFallbackCollisionsNeverLosePreviousContent() {
1502
1503
  const engineering = path.join(repo, "docs", "ENGINEERING.md");
1503
1504
  fs.appendFileSync(engineering, "\n## Archive collision sentinel\n\nPreserve these ENGINEERING bytes.\n");
1504
1505
  const previous = fs.readFileSync(engineering);
1505
- const archiveDir = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.3", "docs");
1506
+ const archiveDir = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.4", "docs");
1506
1507
  const preferred = path.join(archiveDir, "ENGINEERING.md");
1507
1508
  const legacyDigest = path.join(archiveDir, `ENGINEERING-${digest12(previous)}.md`);
1508
1509
  const occupiedPreferred = Buffer.from("occupied-engineering-default\n");
@@ -1532,7 +1533,7 @@ function testArchiveFallbackCollisionsNeverLosePreviousContent() {
1532
1533
  ".agents",
1533
1534
  "archive",
1534
1535
  "auto-coding-skill",
1535
- "4.3.3",
1536
+ "4.3.4",
1536
1537
  "docs",
1537
1538
  "design",
1538
1539
  );
@@ -1557,7 +1558,7 @@ function testArchiveFallbackCollisionsNeverLosePreviousContent() {
1557
1558
  const agents = path.join(repo, "AGENTS.md");
1558
1559
  const previous = Buffer.from("# Project AGENTS before sync\n\nPreserve this sync history.\n");
1559
1560
  fs.writeFileSync(agents, previous);
1560
- const archiveDir = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.3");
1561
+ const archiveDir = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.4");
1561
1562
  const preferred = path.join(archiveDir, "AGENTS.md");
1562
1563
  const legacyDigest = path.join(archiveDir, `AGENTS-${digest12(previous)}.md`);
1563
1564
  const occupiedPreferred = Buffer.from("occupied-sync-default\n");
@@ -1579,7 +1580,7 @@ function testArchiveFallbackCollisionsNeverLosePreviousContent() {
1579
1580
  const agents = path.join(repo, "AGENTS.md");
1580
1581
  const previous = Buffer.from("# Project AGENTS before init\n\nPreserve this init history.\n");
1581
1582
  fs.writeFileSync(agents, previous);
1582
- const archiveDir = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.3");
1583
+ const archiveDir = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.4");
1583
1584
  const preferred = path.join(archiveDir, "AGENTS.md");
1584
1585
  const legacyDigest = path.join(archiveDir, `AGENTS-${digest12(previous)}.md`);
1585
1586
  const occupiedPreferred = Buffer.from("occupied-init-default\n");
@@ -2209,7 +2210,7 @@ function testCliInstallArchivesFeedbackTemplatesAndPreservesReports() {
2209
2210
  writeFile(report, reportContent);
2210
2211
 
2211
2212
  run("node", [cli, "init"], { cwd: repo });
2212
- const archive = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.3", "docs", "skill-feedback", "README.md");
2213
+ const archive = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.4", "docs", "skill-feedback", "README.md");
2213
2214
  assert(fs.readFileSync(feedbackReadme, "utf8").includes("Auto Coding Skill Feedback"), "transactional init must install the managed feedback README");
2214
2215
  assert(fs.readFileSync(archive, "utf8") === previousReadme, "transactional init must archive a pre-existing feedback README before replacement");
2215
2216
  assert(fs.readFileSync(report, "utf8") === reportContent, "transactional init must preserve project feedback reports byte-for-byte");
@@ -2318,21 +2319,21 @@ function testManagedEngineeringInitIsAuthoritativeAndIdempotent() {
2318
2319
  const dryRun = run("node", [cli, "sync", "--projects", repo, "--dry-run", "--json"]);
2319
2320
  const dryResult = JSON.parse(dryRun.stdout).results[0];
2320
2321
  assert(dryResult.managedWorkflow.state === "stale", `dry-run should expose stale workflow state: ${dryRun.stdout}`);
2321
- assert(dryResult.managedWorkflow.version === "4.3.3", "dry-run should expose the target workflow version");
2322
+ assert(dryResult.managedWorkflow.version === "4.3.4", "dry-run should expose the target workflow version");
2322
2323
  assert(dryResult.actions.some(item => item.action === "would-replace" && item.path === "docs/ENGINEERING.md"), "dry-run should plan exact replacement of the managed default document");
2323
2324
  assert(fs.readFileSync(engineering, "utf8") === customized, "dry-run must not write ENGINEERING.md");
2324
2325
 
2325
2326
  run("node", [cli, "init"], { cwd: repo });
2326
2327
  const updated = fs.readFileSync(engineering, "utf8");
2327
2328
  assert(!updated.includes("project note before") && !updated.includes("project note after"), "init must remove text outside the canonical ENGINEERING body");
2328
- assert(updated.includes("version=4.3.3"), "init should install the current managed workflow version");
2329
+ assert(updated.includes("version=4.3.4"), "init should install the current managed workflow version");
2329
2330
  assert(updated.includes("The frontmatter contract is:"), "init should refresh stale managed workflow content");
2330
2331
 
2331
2332
  fillRequiredAccess(repo);
2332
2333
  const status = run("node", [cli, "status", "--projects", repo, "--json"]);
2333
2334
  const statusResult = JSON.parse(status.stdout).results[0];
2334
2335
  assert(statusResult.managedWorkflow.state === "current", `status should expose current managed workflow state: ${status.stdout}`);
2335
- assert(statusResult.managedWorkflow.version === "4.3.3", "status should expose the installed managed workflow version");
2336
+ assert(statusResult.managedWorkflow.version === "4.3.4", "status should expose the installed managed workflow version");
2336
2337
 
2337
2338
  const beforeSecondInit = fs.readFileSync(engineering, "utf8");
2338
2339
  run("node", [cli, "init"], { cwd: repo });
@@ -2360,9 +2361,9 @@ function testLegacyEngineeringMigrationPreservesExistingBody() {
2360
2361
  assert(dryResult.actions.some(item => item.action === "would-archive" && item.path.endsWith("/docs/ENGINEERING.md")), "custom legacy migration must plan archival before replacement");
2361
2362
  run("node", [cli, "sync", "--projects", repo]);
2362
2363
  const migrated = fs.readFileSync(engineering, "utf8");
2363
- assert(migrated.includes("version=4.3.3"), "legacy migration should insert the current managed workflow");
2364
+ assert(migrated.includes("version=4.3.4"), "legacy migration should insert the current managed workflow");
2364
2365
  assert(!migrated.includes(legacyNote), "legacy project text must not remain in the exact managed default document");
2365
- const archive = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.3", "docs", "ENGINEERING.md");
2366
+ const archive = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.4", "docs", "ENGINEERING.md");
2366
2367
  assert(fs.readFileSync(archive, "utf8").includes(legacyNote), "legacy migration must preserve the complete previous body in history");
2367
2368
  const stable = fs.readFileSync(engineering, "utf8");
2368
2369
  run("node", [cli, "sync", "--projects", repo]);
@@ -2390,7 +2391,7 @@ function testOfficialLegacyEngineeringBodyIsReplacedWithoutDuplication() {
2390
2391
  assert(migrated === canonicalEngineering, "official legacy migration must install the exact managed default document");
2391
2392
  assert((migrated.match(/auto-coding-skill:managed-workflow:start/g) || []).length === 1, "official legacy migration should install exactly one managed workflow");
2392
2393
  assert((migrated.match(/^## Execution profiles$/gm) || []).length === 0, "official legacy migration must remove the old duplicated workflow body");
2393
- const archive = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.3", "docs", "ENGINEERING.md");
2394
+ const archive = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.4", "docs", "ENGINEERING.md");
2394
2395
  assert(fs.readFileSync(archive, "utf8").includes("## Execution profiles"), "official legacy body must remain available in the historical archive");
2395
2396
 
2396
2397
  const stable = fs.readFileSync(engineering, "utf8");
@@ -2465,7 +2466,7 @@ function testManagedAgentsMigrationReplacesWholeFileAndArchivesPreviousRules() {
2465
2466
  run("node", [cli, "sync", "--projects", repo]);
2466
2467
  const agents = path.join(repo, "AGENTS.md");
2467
2468
  const initial = fs.readFileSync(agents, "utf8");
2468
- assert(initial.includes("managed-agents:start version=4.3.3"), "new projects should receive the versioned root AGENTS block");
2469
+ assert(initial.includes("managed-agents:start version=4.3.4"), "new projects should receive the versioned root AGENTS block");
2469
2470
 
2470
2471
  const custom = [
2471
2472
  "# Project rules",
@@ -2487,15 +2488,15 @@ function testManagedAgentsMigrationReplacesWholeFileAndArchivesPreviousRules() {
2487
2488
 
2488
2489
  run("node", [cli, "sync", "--projects", repo]);
2489
2490
  const migrated = fs.readFileSync(agents, "utf8");
2490
- assert(migrated.includes("managed-agents:start version=4.3.3"), "AGENTS migration should install the current managed block");
2491
+ assert(migrated.includes("managed-agents:start version=4.3.4"), "AGENTS migration should install the current managed block");
2491
2492
  assert(!migrated.includes("Preserve this repository-specific rule exactly."), "root AGENTS must contain no project-specific tail");
2492
2493
  assert(!migrated.includes("must execute `commands.gate_full`"), "known official conflicting rule should be removed");
2493
2494
  const canonical = fs.readFileSync(path.join(repoRoot, "cli", "assets", "skill", "data", "templates", "bridges", "AGENTS.md"), "utf8");
2494
2495
  assert(migrated === canonical, "root AGENTS must be byte-identical to the packaged canonical file");
2495
- const archive = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.3", "AGENTS.md");
2496
+ const archive = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.4", "AGENTS.md");
2496
2497
  assert(fs.readFileSync(archive, "utf8").includes("Preserve this repository-specific rule exactly."), "previous AGENTS content must be archived once");
2497
2498
  assert(!exists(legacyActiveArchive), "legacy active-doc AGENTS archives must leave docs/archive during upgrade");
2498
- const migratedLegacyArchiveDir = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.3", "docs", "archive", "workflow");
2499
+ const migratedLegacyArchiveDir = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.4", "docs", "archive", "workflow");
2499
2500
  assert(
2500
2501
  listProjectFiles(migratedLegacyArchiveDir).some(file => fs.readFileSync(file).equals(legacyActiveArchiveBytes)),
2501
2502
  "legacy active-doc AGENTS archive bytes must survive under the managed archive root",
@@ -2553,7 +2554,7 @@ function testEngineeringMarkerBoundaryIsNormalized() {
2553
2554
  const normalized = fs.readFileSync(engineering, "utf8");
2554
2555
  assert(normalized === current, "sync should restore the exact managed document when text is glued to its end marker");
2555
2556
  assert(!normalized.includes("# Project-specific workflow"), "project workflow text must not remain in the managed default document");
2556
- const archive = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.3", "docs", "ENGINEERING.md");
2557
+ const archive = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.4", "docs", "ENGINEERING.md");
2557
2558
  assert(fs.readFileSync(archive, "utf8").includes(`${marker}# Project-specific workflow`), "the malformed previous document must remain available in history");
2558
2559
  }
2559
2560
 
@@ -2570,7 +2571,7 @@ function testEngineeringFrameworkRejectsAnyNonCanonicalWorkflowText() {
2570
2571
 
2571
2572
  run("node", [cli, "init"], { cwd: repo });
2572
2573
  assert(!fs.readFileSync(engineering, "utf8").includes("backend owns APIs"), "init must restore the canonical ENGINEERING body");
2573
- const archived = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.3", "docs", "ENGINEERING.md");
2574
+ const archived = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.3.4", "docs", "ENGINEERING.md");
2574
2575
  assert(fs.readFileSync(archived, "utf8").includes("backend owns APIs"), "removed project text should remain in non-authoritative history");
2575
2576
  }
2576
2577
 
@@ -2582,12 +2583,12 @@ function testManagedInstallIntegrityIsBoundedAndRepairable() {
2582
2583
 
2583
2584
  const manifestPath = path.join(repo, ".agents", "managed-install.json");
2584
2585
  const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf8"));
2585
- assert(manifest.schema_version === 1 && manifest.skill_version === "4.3.3", "installed manifest must identify the release");
2586
+ assert(manifest.schema_version === 1 && manifest.skill_version === "4.3.4", "installed manifest must identify the release");
2586
2587
  assert(manifest.entries.length > 0, "installed manifest must list managed files");
2587
2588
  for (const entry of manifest.entries) {
2588
2589
  assert(typeof entry.path === "string" && !path.isAbsolute(entry.path) && !entry.path.includes(".."), "manifest paths must be safe relative paths");
2589
2590
  assert(/^[0-9a-f]{64}$/.test(entry.sha256), `${entry.path}: manifest hash must be sha256`);
2590
- assert(entry.version === "4.3.3" && typeof entry.executable === "boolean", `${entry.path}: version/executable metadata missing`);
2591
+ assert(entry.version === "4.3.4" && typeof entry.executable === "boolean", `${entry.path}: version/executable metadata missing`);
2591
2592
  }
2592
2593
  assert(!manifest.managed_namespaces.some(item => item.path === ".agents" || item.path === "docs"), "manifest must not mirror entire project-owned trees");
2593
2594
 
@@ -2667,7 +2668,7 @@ function testSkillFeedbackCollectionIsBoundedReadOnlyAndMetadataOnly() {
2667
2668
  run("node", [cli, "status", "--projects", third, "--json"], { check: false }).stdout,
2668
2669
  ).results[0];
2669
2670
  assert(emptyStatus.feedback.available === true, "status must expose feedback before the first report");
2670
- assert(emptyStatus.feedback.skillVersion === "4.3.3", "empty feedback status must expose the installed Skill version");
2671
+ assert(emptyStatus.feedback.skillVersion === "4.3.4", "empty feedback status must expose the installed Skill version");
2671
2672
  const signature = `sha256:${"a".repeat(64)}`;
2672
2673
  const marker = path.join(os.tmpdir(), `autocoding-feedback-must-not-execute-${crypto.randomUUID()}`);
2673
2674
  const render = (project, reportId, privateMarker) => [
@@ -2677,7 +2678,7 @@ function testSkillFeedbackCollectionIsBoundedReadOnlyAndMetadataOnly() {
2677
2678
  "status: open",
2678
2679
  'created_at: "2026-07-18T10:00:00+08:00"',
2679
2680
  `project: ${project}`,
2680
- "observed_skill_version: 4.3.3",
2681
+ "observed_skill_version: 4.3.4",
2681
2682
  "component: reviewer-runtime",
2682
2683
  "kind: defect",
2683
2684
  "impact: blocking",
@@ -2711,7 +2712,7 @@ function testSkillFeedbackCollectionIsBoundedReadOnlyAndMetadataOnly() {
2711
2712
  .replace("schema: auto-coding-skill-feedback/v1", "schema: auto-coding-skill-feedback/v2")
2712
2713
  .replace("status: open", `status: ${options.status ?? "open"}`)
2713
2714
  .replace('created_at: "2026-07-18T10:00:00+08:00"', 'created_at: "2026-07-18T10:00:00+08:00"\nupdated_at: "2026-07-19T10:00:00+08:00"')
2714
- .replace("observed_skill_version: 4.3.3", `observed_skill_version: ${options.observed ?? "4.3.3"}\nlast_verified_skill_version: ${options.lastVerified ?? options.observed ?? "4.3.3"}`)
2715
+ .replace("observed_skill_version: 4.3.4", `observed_skill_version: ${options.observed ?? "4.3.4"}\nlast_verified_skill_version: ${options.lastVerified ?? options.observed ?? "4.3.4"}`)
2715
2716
  .replace(signature, options.signature)
2716
2717
  .replace("export: metadata-only", `resolution: ${options.resolution ?? "pending"}\nexport: metadata-only`);
2717
2718
  const firstReport = path.join(first, "docs", "skill-feedback", "reports", "2026-07-18-review-timeout-a13f82c1.md");
@@ -2775,7 +2776,7 @@ function testSkillFeedbackCollectionIsBoundedReadOnlyAndMetadataOnly() {
2775
2776
  assert(lifecycleCheck.metadata.find(item => item.report_id === "ACSF-assets-20260718-fd5748e4")?.lifecycle === "regression-current", "a fixed signature reproduced on the fixed release must re-enter active triage as a regression");
2776
2777
  writeFile(fixedReport, fixedContent);
2777
2778
 
2778
- writeFile(firstOtherReport, firstOtherContent.replace("observed_skill_version: 4.3.3", "observed_skill_version: 4.2.8"));
2779
+ writeFile(firstOtherReport, firstOtherContent.replace("observed_skill_version: 4.3.4", "observed_skill_version: 4.2.8"));
2779
2780
  lifecycleCheck = JSON.parse(run("node", [cli, "feedback", "--projects", first, "--json"]).stdout);
2780
2781
  assert(lifecycleCheck.metadata.find(item => item.report_id === "ACSF-geesight-20260718-c35fa4e3")?.lifecycle === "recheck-due", "an unresolved v1 report from an older Skill version must require recheck");
2781
2782
  writeFile(firstOtherReport, firstOtherContent);
@@ -2825,14 +2826,14 @@ function testSkillFeedbackCollectionIsBoundedReadOnlyAndMetadataOnly() {
2825
2826
  }
2826
2827
 
2827
2828
  function testReleaseVersionMarkersStayInSync() {
2828
- const expected = "4.3.3";
2829
+ const expected = "4.3.4";
2829
2830
  const pkg = JSON.parse(fs.readFileSync(path.join(repoRoot, "package.json"), "utf8"));
2830
2831
  const lock = JSON.parse(fs.readFileSync(path.join(repoRoot, "package-lock.json"), "utf8"));
2831
2832
  const policy = JSON.parse(fs.readFileSync(
2832
2833
  path.join(repoRoot, "src", "auto-coding-skill", "data", "policies", "workflow-migrations-v1.json"),
2833
2834
  "utf8",
2834
2835
  ));
2835
- assert(pkg.version === expected, "package version must match the 4.3.3 release");
2836
+ assert(pkg.version === expected, "package version must match the 4.3.4 release");
2836
2837
  assert(lock.version === expected && lock.packages[""].version === expected, "package-lock versions must match");
2837
2838
  assert(policy.managed_versions.engineering === expected && policy.managed_versions.agents === expected, "managed workflow versions must match");
2838
2839
  const manifest = JSON.parse(fs.readFileSync(path.join(repoRoot, "cli", "assets", "managed-install.json"), "utf8"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elvis1513/auto-coding-skill",
3
- "version": "4.3.3",
3
+ "version": "4.3.4",
4
4
  "description": "CLI installer for a delivery-first .agents workflow with adaptive Git isolation, routed changed-scope validation, risk-based review, push completion, and safe cleanup.",
5
5
  "type": "module",
6
6
  "bin": {