feat: prove the lessons, check overlays in evaluation, and settle the cost steps
Some checks failed
validation / verify (push) Failing after 13s
Some checks failed
validation / verify (push) Failing after 13s
- Schema review: a dotted path is judged only when it starts at a name the resource type has, so a database flag or a service name is no longer read as a missing setting. Lesson L-04, which worked around that, is retired. - Skill routing: in a Change request the question says what changed. - Evaluation: a case may list code_standards the infrastructure code must meet; case 06 checks its overlay's regions, naming and labels. - Model tiers (iteration 5 step 6): a lighter model for a role's first attempt, named in the provider bundle. Measured on case 03 and left off: Flash saved five cents on the IaC author and took twice the requests. - Steps 7 and 9 decided against on the numbers, recorded in the plans. - Plans: the runs of cases 05 and 06, and the first proof of the lessons on case 03 (no Revision, 22 minutes against 28, quality held). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -64,6 +64,20 @@ def _names(block: Mapping[str, Any]) -> set[str]:
|
||||
return names
|
||||
|
||||
|
||||
def _is_missing(setting: str, known: set[str]) -> bool:
|
||||
"""Whether a name a Check uses is a setting the resource type lacks.
|
||||
|
||||
A path is judged by the setting at its end, and only when it starts at a name
|
||||
the type has. One that does not start there is a value written with dots, such
|
||||
as a database flag (`cloudsql.iam_authentication`) or a service
|
||||
(`run.googleapis.com`): both were raised as missing settings on 2026-10-09.
|
||||
"""
|
||||
first, _, rest = setting.partition(".")
|
||||
if rest and first not in known:
|
||||
return False
|
||||
return setting.split(".")[-1] not in known
|
||||
|
||||
|
||||
class SchemaReview:
|
||||
def __init__(self, runner: TerraformRunner) -> None:
|
||||
self._runner = runner
|
||||
@@ -111,9 +125,7 @@ class SchemaReview:
|
||||
missing = [
|
||||
setting
|
||||
for setting in named_settings(check.statement)
|
||||
# A resource type named in the statement is not a setting, and a
|
||||
# path is judged by the setting at its end.
|
||||
if setting not in schemas and setting.split(".")[-1] not in known
|
||||
if setting not in schemas and _is_missing(setting, known)
|
||||
]
|
||||
if missing:
|
||||
concerns.append(
|
||||
|
||||
Reference in New Issue
Block a user