Skip to content

A first version's public copy catches a short owner quote whose padding or quote marks are encoded - #4778

Merged
capy-ai[bot] merged 4 commits into
mainfrom
public-copy-redacts-encoded-padded-quotes
Nov 24, 2026
Merged

capy-ai[bot] merged 4 commits into
mainfrom
public-copy-redacts-encoded-padded-quotes

Conversation

@garrytan

@garrytan garrytan commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

A first version's public export now catches a short owner quote when its padding or quote marks are encoded, such as  , a zero-width space, " or a JSON \".
Why: those spellings kept the owner's words in the public copy and validate --public passed them; short quotes are now matched on the same decoded text the long-quote scan reads.
Nothing to do: the redaction still replaces only the original characters of the quote.

What changed
  • lib/autoplan-owner-words.ts: short plan quotes are also matched on the decoded view of each file (entities, JSON escapes and invisible characters decoded, in both the raw and the rendered view), with offsets mapped back to the original text, the way the long-quote scan already works. Spaces between a short quote's words match any run of whitespace, so an encoded or doubled space between them is caught too. The raw-text match stays, so a quote whose own text holds an entity is still caught.
  • Docs: the public-copy rule in docs/unattended.md and the ARTIFACT_OWNER_WORDS entry in docs/troubleshooting.md.
Tests
  • CI at 853fecc carries the full free suite: 1,779 test files, 0 failed (Free Tests run 45335081640), plus the macOS and Windows jobs.
  • test/autoplan-owner-words.test.ts: one case per encoded form (  padding, zero-width padding, " marks,   inside the quote, JSON-escaped marks) and encoded or doubled spaces between a quote's words; each leaks without the fix. The same test pins today's over-redaction of a bare mention framed by two neighboring quoted strings, and keeps a plain mention and a longer quoted sentence unchanged.
  • test/autoplan-public-owner-words.test.ts: validate --public catches a quote padded with   or a zero-width space written back (fails on main); the whole-export table gets entity-padded and zero-width-padded plan quotes (these already pass on main and guard the plan side).
Pre-Landing Review

Two review rounds. Round 1 found that a short quote whose words were separated by an encoded or doubled space still leaked; fixed here. Round 2, a full pass, found nothing. A second-model review left three low notes, none blocking:

  • A zero-width character used as the only separator between a quote's words ("ship​it") is not caught.
  • Markdown emphasis inside the quote marks ("**ship it**") still hides a short quote. This was true before this change.
  •   padding and quoted link targets can redact a little more than the quote itself; that fails safe.
Agent notes

Follow-up to #4776 (adversarial-native#1 at 29557a3), shipped apart from GST-3646 item 3 on the maintainer's ruling.

No approvals recorded for branch public-copy-redacts-encoded-padded-quotes.
Plan: exempt: bug fix (R65)
Plan check: exempt bug fix

Open in Capy

{
  "schema_version": 1,
  "pr": 4778,
  "head": "853fecc57440465820ffaa8c35157a8069d6e895",
  "version": "1.103.0.0",
  "base": "main",
  "gate": {
    "test": {
      "pass": 39395,
      "fail": 0,
      "skip": 67
    }
  },
  "ci_carried": [
    {
      "lane": "test",
      "run": 45335081640,
      "attempt": 1,
      "tree": "a08e0118d8a0fc3c651379c29a4e4d76d68b27c8"
    }
  ],
  "calls": 21,
  "session_kind": "unattended",
  "run": "gsta830-f3",
  "head_tree": "a08e0118d8a0fc3c651379c29a4e4d76d68b27c8",
  "product_patch_id": "d4ed13578e68014dd46f2299b4ee0368387d02de",
  "gstack_version": "1.103.0.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 20,
    "rules": "33831f8248a814fd",
    "base": "f3a89d2105a8f18852e8b15a016ad7153e6c19dc",
    "registry": "f3a89d2105a8f18852e8b15a016ad7153e6c19dc",
    "gate_scan": {
      "tagged": 0,
      "head": "853fecc57440465820ffaa8c35157a8069d6e895"
    },
    "reasons": [
      "runtime=20"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @a08e0118d8a0 (8 checks, current for 853fecc57440)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/45335081640/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=a08e0118d8a0 tests=39395 skipped=67 runs=45335081640/1 profiles=ci-reuse/free-tests heads=853fecc57440 verified=2026-11-24T05:56:00.528Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "README.md, docs/, crew/docs/, capy/skill/gstack guides, autoplan/DRIVER.md.tmpl and ship/sections/apple-release.md.tmpl"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 3,
    "fixed": 1,
    "scope": "frozen",
    "rounds": 2,
    "dispatches": {
      "specialist": 2
    }
  },
  "gate_dispositions": []
}

garrytan and others added 2 commits November 24, 2026 04:21
…side its quote marks

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

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot changed the base branch from public-copy-redacts-padded-short-quotes to main November 24, 2026 05:25
@trunk-io

trunk-io Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 2 commits November 24, 2026 05:26
…ncoded-padded-quotes

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

# Conflicts:
#	docs/troubleshooting.md
#	docs/unattended.md
#	lib/autoplan-owner-words.ts
#	test/autoplan-public-owner-words.test.ts
…d or doubled space

Review-Finding: p1/specialist-batched#1 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit bb6d13e into main Nov 24, 2026
61 checks passed
@garrytan garrytan mentioned this pull request Nov 24, 2026
capy-ai Bot added a commit that referenced this pull request Nov 24, 2026
- `/ship` now tells you what to change when GitHub refuses a push for email privacy. (#4748)
- The release gate's /cso check accepts the low-confidence hypotheses /cso now reports. (#4753)
- /cso reports every security finding the code supports instead of dropping most of them. (#4739)
- /cso can search the whole repository in one call, and a daily report now lists its low-confidence hypotheses. (#4742)
- A first version's plan and try-it message now open with the owner's own words, and the build is tried the same way he will try it before he is asked. (#4759)
- A first version's public export now keeps out the owner's short quotes and his reasons to leave something out, and a phone first-use check installs a build the cloud phone can actually run. (#4772)
- Three intermittent test failures are fixed. (#4745)
- Free Tests runs its shards on 8-core runners again. (#4749)
- A land that waits on an earlier CI run now decides on what that run actually did. (#4763)
- Landing a PR no longer starts a new CI run when one for the same merged code is already running or has passed. (#4760)
- /ship no longer misses a file-mode change from main on files whose names start with `:`. (#4774)
- make-pdf keeps quotes in alt text, link titles and raw HTML attributes inside the attribute, so a Markdown file can no longer add an `onerror`, `onload` or `javascript:` link that runs in the print browser. (#4761)
- Posting a PR body that lists earlier /ship runs no longer stops for a phone number that isn't there. (#4747)
- A first version's public export now catches a short owner quote whose padding or quote marks are encoded. (#4778)
- A first version's public export now also keeps out a short owner quote written with spaces just inside its quote marks. (#4776)
- Posting a PR body that lists earlier /ship runs no longer stops for a card number that isn't there. (#4751)
- /ship no longer asks for an extra reader when you merge the base branch next to code that was already reviewed. (#4754)
- /ship no longer plans narrow re-checks after a fix. (#4741)
- /ship can't quietly gain new refusals. (#4740)
- `gstack-upgrade` no longer refuses to run after you disable skills. (#4743)
- The free test suite splits its shards from this week's recorded test times. (#4744)
- gstack now writes up a failed or shelved attempt before closing it. (#4735)

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