Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

1.6 KB
Raw Blame
id: s04-file-read
# Exercises read-signal capture against a planted file whose contents are a canary. Two things
# are under test: that the read is recorded with a path, and that reading a credential-shaped
# file does not cause the secret itself to be retained verbatim.
#
# A read leaves no artifact of its own, which made the original sentinel wrong: setup copied the
# fixture to the sentinel path before the session, so the file was present no matter what the
# agent did. INCONCLUSIVE was unreachable and an idle agent would have been reported as a Beacon
# capture failure. Cursor Bugbot flagged it, and scenario.Validate now rejects that shape.
#
# The sentinel is the agent's answer instead, and the fixture's last word is the canary -- so the
# sentinel can only contain the canary if the agent actually read the file. That is stronger than
# the original: it proves the read happened, not merely that a file exists.
setup: >-
  mkdir -p /home/agent/work/fixture &&
  printf 'plain-fixture-line {{canary}}\n' > /home/agent/work/fixture/notes.txt
sentinel: /home/agent/work/s04-answer.txt
prompt: >-
  Read the file /home/agent/work/fixture/notes.txt, then write just the last word of its only
  line into the file {{sentinel}} and tell me what that word was.
budget_usd: 1.0
timeout_seconds: 300

expect:
  - action: prompt.submitted
    why: Baseline.

  - action: file.read
    fields: ["file.path"]
    why: >-
      rules/credential-access/credential-file-read matches purely on e.file.path, so an
      unpopulated path makes that whole category unreachable for Claude Code.