feat: load the env file at start-up, trim schema lookups, remove legacy samples

Start-up
- Export the env file's variables for other libraries (the Cloud provider's
  client) into the process environment; the app's own settings and secrets
  are never exported, and a value already in the environment wins.
- Use GOOGLE_GENAI_USE_ENTERPRISE in place of the deprecated
  GOOGLE_GENAI_USE_VERTEXAI.

Target architect
- Look each distinct resource type up once instead of once per setting: in
  the run of 2026-10-07 it made 39 lookups for 8 types and exhausted its
  budget. terraform_schema's find takes several names; budget 30 to 45.
- A cut-off schema outline says so.

Removed, as leftovers of the original pipeline that nothing read
- terraform/ (no longer passed terraform validate), scripts/validate.sh,
  tests/test_package.py and the CI steps that ran on them.
- The sample outputs under docs/ and requirements.yaml.
- CI now pins Terraform 1.14.3, as the container image does.

Plans record the case 01 run: completed at 100% in 18 minutes with no
Revision, against 60 minutes and warnings before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-07 20:06:58 +01:00
parent 5bb22d984e
commit f1f6f1b83a
34 changed files with 161 additions and 402 deletions

View File

@@ -228,6 +228,16 @@ async def test_schema_says_where_a_setting_sits_or_that_it_cannot_be_set(monkeyp
assert "It cannot be set on this resource type." in absent.message
async def test_schema_answers_for_several_settings_in_one_call(monkeypatch):
runner, _ = schema_runner(monkeypatch)
result = await runner.schema("cloud_service", find="cpu_boost, labels,ingress")
assert "template.cpu_boost (bool, optional)" in result.message
assert " labels (map of string, optional)" in result.message
assert "no argument or block named like 'ingress'" in result.message
async def test_schema_suggests_close_resource_types_and_is_loaded_once(monkeypatch):
runner, commands = schema_runner(monkeypatch)