decomposer: generate deliverable files for Discover and structure the solution's functional requirements, non-functional requirements, constraints, assumptions, and open questions without selecting cloud products.; Select Google Cloud products from the confirmed requirements and produce the solution architecture, Mermaid diagram, architecture description, and Terraform infrastructure-as-code.; Validate the Terraform infrastructure and architecture artifacts without deploying resources by running formatting checks, Terraform validation, and a dry-run or plan-oriented deployment check.; Package the approved requirements, architecture, Mermaid diagram, Terraform IaC, and validation results into solution-architecture-guide.md in the gcp_solution_architecture_agent repository.; Verify that the gcp_solution_architecture_agent repository contains the packaged solution-architecture-guide.md with the approved workflow outputs.; Verify that the repository is derived from the workflow_agent template and implements the complete four-phase Google Cloud solution architecture workflow alongside the packaged guide.; Publish the verified gcp_solution_architecture_agent repository with its completed workflow implementation and solution architecture guide.; Verify that the published repository revision contains the completed workflow implementation and solution architecture guide.
Some checks failed
validation / verify (push) Failing after 13s

This commit is contained in:
2026-09-01 20:00:05 +00:00
parent f1d8e1ffcf
commit 7926fabc37
13 changed files with 341 additions and 205 deletions

View File

@@ -1,15 +1,37 @@
from pathlib import Path
import pathlib
import re
import unittest
ROOT = Path(__file__).parents[1]
ROOT = pathlib.Path(__file__).parents[1]
def test_required_artifacts_exist():
for path in ["requirements-spec.md", "architecture.md", "solution-architecture-guide.md", "terraform/main.tf", "scripts/validate_artifacts.py"]:
assert (ROOT / path).is_file()
def test_workflow_has_four_phases():
text = (ROOT / "README.md").read_text()
assert all(f"{n}." in text for n in range(1, 5))
class ArtifactTests(unittest.TestCase):
def test_requirements_defer_products(self):
text = (ROOT / "docs/requirements.md").read_text()
self.assertIn("Product selection deferred:", text)
self.assertIn("Open questions", text)
def test_terraform_is_not_an_apply_script():
text = (ROOT / "architecture.md").read_text()
assert "No apply is used" in text
def test_architecture_has_products_and_flow(self):
text = (ROOT / "docs/architecture.md").read_text()
for product in ("Cloud Run", "Pub/Sub", "Cloud Storage", "Firestore"):
self.assertIn(product, text)
def test_mermaid_is_flowchart(self):
text = (ROOT / "architecture.mmd").read_text()
self.assertTrue(text.startswith("flowchart"))
self.assertIn("Cloud Run", text)
def test_terraform_root_is_complete(self):
main = (ROOT / "terraform/main.tf").read_text()
self.assertIn("google_cloud_run_v2_service", main)
self.assertIn("google_pubsub_topic", main)
self.assertNotRegex(main, r"(?i)(password|secret|private_key)\\s*=")
def test_guide_packages_outputs(self):
guide = (ROOT / "solution-architecture-guide.md").read_text()
for heading in ("Requirements", "Architecture", "Terraform", "Validation", "Verification"):
self.assertIn(heading, guide)
if __name__ == "__main__":
unittest.main()