Skip to content

Commit 1cbc777

Browse files
rustyconoverclaude
andcommitted
fix(fixtures): restore process() on scoped/multi secret demo fixtures
The scope/type-aware ResolvedSecrets refactor (4351f33) left the process() method that emits {scope, found, secret_keys} attached to MultiSecretDemoFunction instead of ScopedSecretDemoFunction. As a result ScopedSecretDemoFunction had no process() (abstract-instantiation TypeError) and MultiSecretDemoFunction's process() read state.found / state.secret_keys, which MultiSecretDemoState does not define (AttributeError). Give ScopedSecretDemoFunction its process() back, and give MultiSecretDemoFunction a correct one that emits api_key from MultiSecretDemoState. Fixes secret_scoped.test and secret_multi_scope.test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 4351f33 commit 1cbc777

1 file changed

Lines changed: 22 additions & 7 deletions

File tree

‎vgi/_test_fixtures/table/settings.py‎

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,25 @@ def initial_state(cls, params: ProcessParams[ScopedSecretDemoArgs]) -> ScopedSec
412412
secret_keys=",".join(secret.keys()) if secret else "",
413413
)
414414

415+
@classmethod
416+
def process(
417+
cls,
418+
params: ProcessParams[ScopedSecretDemoArgs],
419+
state: ScopedSecretDemoState,
420+
out: OutputCollector,
421+
) -> None:
422+
"""Emit scope info and resolved secret keys."""
423+
batch = pa.RecordBatch.from_pydict(
424+
{
425+
"scope": [params.args.path],
426+
"found": [state.found],
427+
"secret_keys": [state.secret_keys],
428+
},
429+
schema=params.output_schema,
430+
)
431+
out.emit(batch)
432+
out.finish()
433+
415434

416435
@dataclass(kw_only=True)
417436
class MultiSecretDemoState(ArrowSerializableDataclass):
@@ -456,16 +475,12 @@ def initial_state(cls, params: ProcessParams[ScopedSecretDemoArgs]) -> MultiSecr
456475
def process(
457476
cls,
458477
params: ProcessParams[ScopedSecretDemoArgs],
459-
state: ScopedSecretDemoState,
478+
state: MultiSecretDemoState,
460479
out: OutputCollector,
461480
) -> None:
462-
"""Emit scope info and resolved secret keys."""
481+
"""Emit the resolved api_key for the path-matched secret."""
463482
batch = pa.RecordBatch.from_pydict(
464-
{
465-
"scope": [params.args.path],
466-
"found": [state.found],
467-
"secret_keys": [state.secret_keys],
468-
},
483+
{"api_key": [state.api_key]},
469484
schema=params.output_schema,
470485
)
471486
out.emit(batch)

0 commit comments

Comments
 (0)