Skip to content

Replaying a saved test double-prefixes variable namespace ({{secrets.user.secrets.user.X}}) → variable never resolves #76

@komal-lt

Description

@komal-lt

Summary

When a saved *_test.md references a store/secret variable using its namespaced form (e.g. {{secrets.user.KANE_TEST_USER}} — which is exactly how the TUI writes it into the saved test), replaying the test prepends the namespace again, producing {{secrets.user.secrets.user.KANE_TEST_USER}}, which does not resolve. The literal placeholder string is typed into the field instead of the value.

Severity

S1 — TUI-authored tests that use variables cannot be replayed reliably; the doubled key never resolves.

kane-cli version

0.4.0

Repro

  1. In the TUI, author a test that types a store secret variable (e.g. email/password) and save it. The saved *_test.md frontmatter + step use {{secrets.user.KANE_TEST_USER}}.
  2. Replay it: kane-cli testmd run <saved>_test.md --env prod --agent --headless.

Actual

Action log shows:

Filled '{{secrets.user.secrets.user.KANE_TEST_USER}}' via DOM locator ... success:true
Filled '{{secrets.user.secrets.user.KANE_TEST_PASSWORD}}' via DOM locator ... success:true

i.e. the namespace is doubled and the literal is typed. (The run may still "recover" via self-heal re-authoring or a persisted browser session, masking the bug.)

Expected

Replaying a saved test should resolve {{secrets.user.X}} to its value once, not re-prefix it to {{secrets.user.secrets.user.X}}.

Impact

This is the core author-in-TUI → replay-in-CI workflow. The doubling silently breaks credential injection on replay; it only "works" when something else (self-heal / cached session) compensates. Related: #69, #75.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions