feat: a stated choice must reach a requirement, and only pinned providers (iteration 9 step 3)
Some checks failed
validation / verify (push) Failing after 11s
Some checks failed
validation / verify (push) Failing after 11s
Case 08 named the customer's stated topology in its design and did not build it; every Check passed because none asked for it. - The catalogue marks the 26 fields that bind a design. The agreed scope lists the ones the customer stated; what was assumed for them does not bind. - A requirement says what it comes from. A submission of requirements is refused when one of the customer's own requirements, or a stated binding field, is named by none, or when the requirement carrying a choice is not a constraint with a condition. The existing chain then owes it a Check. - Generated code may use only the providers the bundle pins: a resource or a required_providers entry of any other is refused before Terraform runs. - The guide opens with how much of the design the customer stated, how much was assumed and how much is unknown. Not run with real models. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
11
app/scope.py
11
app/scope.py
@@ -82,6 +82,9 @@ class FieldSpec:
|
||||
keys: tuple[str, ...] = ()
|
||||
optional_keys: tuple[str, ...] = ()
|
||||
aliases: tuple[str, ...] = ()
|
||||
# A choice a design must honour. Stated by the customer, it has to be carried
|
||||
# by a requirement, and so by a Check on the Target architecture.
|
||||
binds: bool = False
|
||||
|
||||
def tier_for(self, kind: str | None) -> str:
|
||||
if isinstance(self.tier, Mapping):
|
||||
@@ -118,6 +121,7 @@ def load_catalogue(path: Path) -> Catalogue:
|
||||
keys=tuple(raw.get("keys") or ()),
|
||||
optional_keys=tuple(raw.get("optional_keys") or ()),
|
||||
aliases=tuple(raw.get("aliases") or ()),
|
||||
binds=bool(raw.get("binds")),
|
||||
)
|
||||
return Catalogue(
|
||||
schema_version=int(data.get("schema_version", 1)),
|
||||
@@ -248,6 +252,13 @@ class Scope:
|
||||
return {
|
||||
"kind": self.kind,
|
||||
"stated": stated,
|
||||
# The stated fields a design must honour: each has to be carried by a
|
||||
# requirement, which the requirements are checked for.
|
||||
"binding": [
|
||||
path
|
||||
for path in self.values
|
||||
if self.catalogue.fields[path].binds and self.source(path) != ASSUMED
|
||||
],
|
||||
# What the agent chose where the customer did not say. Not the
|
||||
# customer's decision: it may be revisited when they answer.
|
||||
"assumed": [
|
||||
|
||||
Reference in New Issue
Block a user