Skip to content

fix: stop publishing prospect data; correct stale profile guidance - #7

Merged
anusbutt merged 1 commit into
mainfrom
008-email-only-profiles
Jul 26, 2026
Merged

fix: stop publishing prospect data; correct stale profile guidance#7
anusbutt merged 1 commit into
mainfrom
008-email-only-profiles

Conversation

@anusbutt

Copy link
Copy Markdown
Owner

Follow-up to #6, which merged before this audit finished. One commit.

What & why

A consistency audit of the public repo against the features that actually shipped, prompted by the question "does every doc still align, because it's a public repo?" Three real problems, one of them urgent.

1. Prospect data is published (urgent)

candidates.csv is tracked on main: 108 real businesses, 52 with scraped email addresses, 108 distinct real domains. It was added by 0c5ac04 — the commit titled "chore: stop tracking internal development artifacts" — so it slipped in while the surrounding cleanup was removing other artifacts.

It is also the default --out of prospector source, so any user running discovery gets it in their working tree ready to be committed by accident. Untracked here and gitignored, along with dm_ledger.jsonl and *.local.csv.

Session 1 of this project deliberately redacted prospect lists and rewrote history twice to remove them; this restores that decision.

⚠️ Untracking removes it from HEAD only. The file remains in git history and on any existing clone or fork, and may already be indexed. It must be treated as already disclosed. Purging history is a force-push and a maintainer decision, so it is deliberately not attempted here — see "Notes for reviewers".

2. The drafting instructions gated a Facebook claim on evidence that cannot exist

CONSTRAINTS.md still permitted the possessive channel phrases — "your page", "your inbox", "your messenger" — if the model could cite an fb_* evidence record and had been told the channel signal was strong.

Feature 008 deleted every FB evidence kind and retired the signal, so that condition is now unsatisfiable, and agent_draft.POSSESSIVE_CHANNEL_PHRASES already rejects those phrases unconditionally. The instruction file was therefore weaker than the validator and described a gate that no longer exists — in a file fed to the drafting model on every run. Now banned outright, with the removal explained in place so it is not reintroduced.

Two related fixes: the citation instructions no longer offer fb_link_1 as a sample evidence id (it cannot appear in any catalogue), and the writing guide no longer suggests opening an email on a Facebook page link.

3. Config documentation was incomplete

PROSPECTOR_VAULT is read by config.py but was documented in neither the README table nor .env.example. The Gmail client/token paths were missing from the table. And .env.example predated the profile system entirely, so it never mentioned PROSPECTOR_PROFILE or PROSPECTOR_PROFILES. All 21 env vars the code reads are now documented in both places.

Also: CONTRIBUTING gains an explicit "never commit prospect data" convention, and the bug-report template's example command passes --profile so a new user copying it does not land on an interactive prompt.

How it was verified

  • pytest -q593 passed (unchanged; the instruction edits keep the assembly at 16,852 of 20,000 permitted chars).
  • git ls-files | grep '\.csv$' → no tracked CSV files remain.
  • Cross-checked the env vars read by config.py/profiles.py against those documented in README and .env.example — all three lists now agree.
  • Audited every tracked non-code file, plus the README's internal anchors (all 14 resolve) and docs/architecture.png (predates 008 but contradicts nothing in it — no messenger bucket, no dm).

Checklist

  • Tests added or updated, and pytest passes locally
  • Change is focused (no unrelated refactors)
  • Secrets are not logged, printed, or committed
  • The safety guarantees in CONTRIBUTING.md are preserved

The Facebook guarantee is strengthened: a conditional exception in the model's instructions became an outright ban, bringing the guidance in line with what the validator already enforced. No code path changed.

Notes for reviewers

Decide on the git history. candidates.csv has been public since 0c5ac04. Options, in increasing cost: (a) accept it as disclosed and move on, since the data is public business contact information; (b) rewrite history with git filter-repo and force-push, which breaks every existing clone and does not retract anything already fetched or indexed; (c) additionally notify anyone who forked. This PR does none of them — force-pushing a public repo is the maintainer's call.

Worth noting why the audit was needed at all: every one of these three problems was introduced by a commit that was individually correct. The prospect list rode along with an unrelated cleanup, and the instruction file was left behind by a feature that removed the concept it depended on. Neither would fail a test, because no test asserts on what the repo publishes or on whether the model's instructions still match the evidence it can be given.

🤖 Generated with Claude Code

…dance

Doc/consistency audit of the public repo against the shipped features.

**Prospect data was public.** `candidates.csv` — 108 real businesses, 52 with
scraped email addresses, 108 distinct real domains — was tracked. It was added
by 0c5ac04, the commit that removed the other internal artifacts, so it slipped
in while the surrounding cleanup happened. It is also the default `--out` of
`prospector source`, so a normal run drops it in the working tree ready to be
committed by accident. Untracked and gitignored, along with the DM ledger and
`*.local.csv`. Session 1 deliberately redacted prospect lists from this repo;
this restores that decision. NOTE: untracking removes it from HEAD only — the
file remains in git history and must be treated as already disclosed.

**The drafting instructions gated a Facebook claim on evidence that cannot
exist.** CONSTRAINTS.md still allowed the possessive channel phrases ("your
page", "your inbox", ...) when the model could cite an `fb_*` record and had
been told the signal was strong. Feature 008 deleted every FB evidence kind and
retired the channel signal, so that condition is now unsatisfiable — and the
code already rejects those phrases unconditionally. The instruction file was
therefore weaker than the validator and described a gate that no longer exists.
Now banned outright, with the removal explained so it is not reintroduced.
Two related fixes: the citation example no longer offers `fb_link_1` as a
sample id, and the writing guide no longer suggests opening on a Facebook page
link.

**Config documentation was incomplete.** `PROSPECTOR_VAULT` is read by
config.py but appeared in neither the README table nor `.env.example`; the
Gmail client/token paths were missing from the table; and `.env.example`
predated profiles entirely, so it never mentioned `PROSPECTOR_PROFILE` or
`PROSPECTOR_PROFILES`. All now documented in both places.

Also: CONTRIBUTING gains an explicit "never commit prospect data" convention,
the bug-report template's example command passes --profile so a new user does
not land on an interactive prompt, and the PR checklist wording is consistent
with v7.0.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@anusbutt
anusbutt merged commit bd10b85 into main Jul 26, 2026
2 checks passed
@anusbutt
anusbutt deleted the 008-email-only-profiles branch July 26, 2026 10:19
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