Skip to content

Allow a dict key line in the published harness mechanics counting script past the secret scan - #354

Merged
capy-ai[bot] merged 1 commit into
mainfrom
allow-hm-counting-script-key-line
Nov 15, 2026
Merged

capy-ai[bot] merged 1 commit into
mainfrom
allow-hm-counting-script-key-line

Conversation

@garrytan

@garrytan garrytan commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

The secret scan that runs before merge now accepts one line in the harness mechanics results' published counting script: key = (short.get(kw.get("upstream_model"), kw.get("upstream_model")), arm), a dict key tuple that the scanner reads as a secret-named assignment.
Why: the harness mechanics results pull request (#300) publishes that script as it ran, so the line shouldn't be rewritten, and the scan can't be told a finding is harmless any other way.
Nothing to do: the new allowlist row covers only that one file and is anchored at the flagged value, like the existing row for laneb_agent.py. The pattern matches nothing on main until #300 lands.

What changed
  • .gstack/pregate.json adds one allowlist row: finding env.kv, path wiki/board/2026-11-15-geva-503-harness-mechanics-results/counts.py.txt, and a pattern for the tuple from its opening bracket to the end of the line.
Checks
  • gstack's own allowlist matcher, run on the real line at the scanner's reported position (line 62, column 15), covers the finding with this row. The same line at another path is still reported. A pattern written from the name (key = ...) misses, which is why the row starts at the value.
  • gstack's policy validator accepts the file. The tests that read .gstack/pregate.json pass.
Agent notes

Plan: exempt: bug fix

{
  "schema_version": 1,
  "pr": 354,
  "head": "5e0a36766556e8d9521915729559a28e5a03fc64",
  "version": "0.0.1",
  "base": "main",
  "gate": {
    "test": {
      "pass": 489,
      "fail": 0,
      "skip": 0
    },
    "typecheck": {
      "pass": 1,
      "fail": 0,
      "skip": 0
    },
    "errors": {
      "pass": 1,
      "fail": 0,
      "skip": 0
    },
    "wiki": {
      "pass": 1,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "test",
      "run": 43751475975,
      "attempt": 1,
      "tree": "0364dd231c7961467e7bdda3f8a8346405268029"
    },
    {
      "lane": "typecheck",
      "run": 43751475975,
      "attempt": 1,
      "tree": "0364dd231c7961467e7bdda3f8a8346405268029"
    },
    {
      "lane": "errors",
      "run": 43751475975,
      "attempt": 1,
      "tree": "0364dd231c7961467e7bdda3f8a8346405268029"
    },
    {
      "lane": "wiki",
      "run": 43751475975,
      "attempt": 1,
      "tree": "0364dd231c7961467e7bdda3f8a8346405268029"
    }
  ],
  "session_kind": "unattended",
  "head_tree": "0364dd231c7961467e7bdda3f8a8346405268029",
  "product_patch_id": "a22d11cd016c0d3bb82fcbb6cd2e3f328e998a17",
  "gstack_version": "1.99.5.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 8,
    "rules": "66e5174161eecc2c",
    "base": "b4f1b74aabbd54ed801ede6250b97e6de695e6d8",
    "registry": "b4f1b74aabbd54ed801ede6250b97e6de695e6d8",
    "gate_scan": {
      "tagged": 0,
      "head": "5e0a36766556e8d9521915729559a28e5a03fc64"
    },
    "reasons": [
      "gate-class",
      "runtime=8"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "pass @0364dd231c79 (8 checks, current for 5e0a36766556)",
  "docs": {
    "status": "current",
    "scope": "README.md, AGENTS.md and docs/ (read-only audit; AGENTS.md read in full, the rest by grep for pregate, allowlist and env.kv)"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 0,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "ledgers_read": 2,
    "dispatches": {
      "specialist": 3,
      "red-team": 1
    }
  },
  "gate_dispositions": [],
  "review_exclude": {
    "source": "origin/main@b4f1b74aabbd",
    "patterns": [
      "wiki/plans/*/*-frame.json",
      "wiki/plans/*/*-repos.json",
      "wiki/plans/*/*-licences.json",
      "tests/harness-mechanics/fixtures/arms/**"
    ],
    "applied": [],
    "excluded": 0,
    "excluded_bytes": 0,
    "kept": 0,
    "gate_tagged": [],
    "patterns_sha256": "bf9fcf083ea65c33ffca242a22618acbd0eb78704452c5bcb48335a73d417714",
    "list_sha256": "58d496709dc81f0053419b834fdb12657262a221009af9f9eb2e379a525acadb",
    "digest": "f8758a09269d01cf6e29b2c9b0d15d038166d13d287394f9925c4bf5f2758738"
  }
}

Open in Capy

…ipt past the secret scan

The pre-merge secret scan reads line 62 of the harness mechanics results' published counting script, key = (short.get(...), arm), as a secret-named assignment. It is a dict key tuple. The new allowlist row covers that one file, anchored at the flagged value, the way the existing row covers laneb_agent.py.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found no issues.

Open in Capy

@capy-ai
capy-ai Bot merged commit a01b897 into main Nov 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant