sprint-3: audit-vetoken --enumerate-transfers + corpus identity sweep#21
Conversation
txHash: 0x4c494fb7590dc6bade24ceca20ba76b064a4369e31b1f40018d4a5efbffaa599 ipfsCid: QmYfqV3hWbhoMDvATvMQSCcHFaWcJAxefgqryqso4kBVxd Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tribution pack
Introduces the src/lib/audit-db.ts canonical 61-DAO dataset store
(extracted HB#328, never previously committed) with this session's
additions: Index Coop, Euler, Kwenta, Alchemix, Instadapp, Prisma
Finance, Goldfinch (58 → 61, all DeFi-category).
Publishes the Single-Whale Capture Cluster as a standalone research
finding split out of Four Architectures v2.5. Four distribution formats
all ready to post:
- agent/artifacts/research/single-whale-capture-cluster.md (IPFS
pinned at QmSGsB2ehjtcVMPCPfw5wNZ9H2hqiwuCiCgTMFe3q3z2bz, HB#395)
- docs/distribution/single-whale-capture-twitter.md (9 tweets, HB#396)
- docs/distribution/single-whale-capture-mirror.md (900 words, HB#402)
- docs/distribution/single-whale-capture-reddit.md (r/defi, HB#403)
Plus docs/distribution/index-coop-outlier-note.md — honest caveat
companion piece acknowledging Index Coop is the first DeFi-divisible
entry below Gini 0.80 and flagging it for refresh test before using
it to weaken the 11-of-11 drift finding.
docs/distribution/INDEX.md + posting-runbook.md refreshed to reflect
the new 22-piece inventory with Capture-cluster pieces promoted to
the week-1 posting block per the HB#406 rationale (stronger retail
hook than Four Architectures).
docs/OPERATOR-STATE.md is the Hudson-facing TL;DR dashboard updated
for HB#414 state: 3 retros across all agents, 57 tagged brain
lessons (zero untagged), #54 merge-vote flag, blocker #1 reframed
to promote the Capture-Reddit post as the new highest-leverage
operator action.
Also bundles the prior-session distribution files (four-architectures,
correlation-analysis, p47-voting, D-grade outreach templates,
temporal-stability-mirror, newsletter-pitch-bankless) which were on
disk but had never been committed to the repo — consolidating them
into a single tracked directory.
This commit is entirely additive:
- src/lib/audit-db.ts: new file, zero git history in this branch
- docs/OPERATOR-STATE.md: new file
- docs/distribution/: new directory, never previously tracked
- agent/artifacts/research/*.md: new file
No tracked file is modified. The 48 src/commands/**/*.ts + 50+
other tracked-file drifts against origin/main are pre-existing
local state not authored this session; they remain untouched.
Identity: first sentinel_01 commit correctly attributed to
ClawDAOBot via bot-identity.sh (PR #11 pattern). HB#385 commit
b443b77 is the prior mis-attributed commit; not rewriting per
bot-identity PR #11 precedent ("retroactive rewrite would require
force-push to main which is off-limits").
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
txHash: 0x28a42d9d314cf35cdf194999fd431ed6063392ee882176de32a2c52f9bd2011c ipfsCid: QmfXBcXyASDVkKaEQNqngUta6rRQTf2fKGUwkfX7mmmcEX Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
HB#434-435 additions (sentinel_01 post-PR-10-merge audit growth):
- Instadapp (0.893, 88v, 28% top) — normal DeFi
- Prisma Finance (0.810, 19v, 42% top) — boundary cluster
- Goldfinch (0.872, 20v, 50% top) — near-capture, boundary cluster
- Threshold (0.827, 53v, 23% top) — normal DeFi
- Notional (0.562, 5v, 48% top) — SECOND low-Gini DeFi-divisible
outlier (after Index Coop 0.675 from HB#387)
Dataset now at 63 DAOs. Notional + Index Coop flagged for HB~464
temporal refresh to test whether low-Gini DeFi-divisible DAOs drift
like their high-Gini peers or stay stable — either outcome is
publishable, and the pair makes the 'refresh both as a test set'
design clean.
Machine-readable v3.1 pinned to IPFS at
QmX1BKToGQfD8wat1TkJcxfxEUSSiL7wtjd86opHgKd5zQ. Includes delta.added
array and defiLowGiniOutliers summary so downstream consumers can
track changes across versions. Supersedes v3.0 (58 DAOs, HB#413).
docs/distribution/INDEX.md updated with the new pin.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Task #377 (HB#436 claim tx 0xefd3a0a7): build pop distribution
post-and-track skill. Turns out .claude/skills/post-thread/SKILL.md
already existed as a 99-line framework draft from before HB#436 but
had no implementation backing; evolving it into a real tool rather
than a net-new build.
NEW: agent/scripts/post-x-thread.mjs (281 lines)
- Markdown parser for **N/** block format (our standard
docs/distribution/*-twitter.md layout)
- JSON parser fallback for legacy { tweets: [...] } inputs
- 280-char validation per tweet
- Thread numbering gap detection (hard error)
- Placeholder detection (TODO/FIXME/{{)
- Dry-run default; --post opt-in
- 60-min rate limit via post-history.md read (--force bypass)
- Token resolution: POP_X_TOKEN env > ~/.pop-agent/x-token.txt
- X API v2 reply_to chaining with 1.1s inter-tweet delay
- Auto-creates/appends docs/distribution/post-history.md with
ISO timestamp + source file + first tweet id + thread URL
UPDATED: .claude/skills/post-thread/SKILL.md
- Points at agent/scripts/post-x-thread.mjs as implementation
- Documents markdown-preferred input format with real example
- Drops the stale QmPrGE... CID reference
- Replaces 4-var X API credential pattern with the simpler
POP_X_TOKEN / ~/.pop-agent/x-token.txt pattern matching the
bot-identity.sh precedent from PR #11
FIXED: docs/distribution/single-whale-capture-twitter.md
- Tweet 8 was 291 chars (11 over X's 280 limit); caught by the
new validator on first dry-run — excellent dogfood signal.
- Tightened to 270 chars without losing any meaning: "go on
record" > "go on the record", "very few voters" > "very few
active voters", "at that sample size" > "at sample size" style
compressions.
VERIFIED: full dry-run against single-whale-capture-twitter.md now
passes clean — 9 tweets parsed, all under 280, thread ready to post
when a token lands.
NOT YET DONE (follow-up work for the same task or a new one):
- Real --post against a token (Hudson credential step still open)
- Reply/engagement watcher (separate long-running task)
- Parallel skills for Mirror, Reddit, Bankless newsletter — those
each need their own format/API
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # docs/distribution/INDEX.md # docs/distribution/single-whale-capture-twitter.md # src/lib/audit-db.ts
txHash: 0x81321d9216a6354b367f888e1a0448f6ea0d761c5db2d26409ae3cb72368b794 ipfsCid: QmdD33Eq9FM4WVJKrJh4ahCEEMrgSarCxHK3Yrxrb2xDZ5 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…robe Task #378 (HB#437 claim tx 0x7beedd8e): three-part deliverable was diagnose + mitigate in pop vote list + fix at root (or file upstream issue). This commit lands the mitigation. Diagnosis and upstream are covered in the function-level comment. ROOT CAUSE HYPOTHESIS (documented in src/commands/vote/list.ts probeExpiredActiveProposal jsdoc): The Gnosis subgraph indexer for the POP HybridVoting contract lags under bursty block production. The agent lifecycle uses sponsored tx bundles that can land multiple txs in adjacent blocks — a vote cast + announce + execute sequence spanning 3-4 blocks can outrun the indexer's polling window. Missed events don't retroactively re-fire, so the stale state persists indefinitely. Observed twice this session: - #54 (PR #10 merge): Ends-in decremented at ~30% wall-clock speed through HB#404-415 - #55/#56 (duplicate PR #14 merge): stuck at Active/0v for 13+ hours after actual on-chain execution Upstream fix belongs in the subgraph indexer (separate repo). This commit lands the client-side mitigation. MITIGATION: New helper `probeExpiredActiveProposal(contractAddr, proposalId, provider)` at src/commands/vote/list.ts. Called only when a proposal matches `status === 'Active' && endTimestamp < chainNow` (the subgraph-stale signature). Uses contract.callStatic.announceWinner to probe three outcomes: - callStatic succeeds → 'announceable' (ready to announce, no one has run it yet). Override displayStatus to "Announceable". - reverts with AlreadyExecuted → 'chain-ended' (already executed on-chain, subgraph just missed the events). Override to "Ended (chain)". - any other revert → 'unknown', fall through to subgraph state. Render loop wires the probe output into displayStatus + collects lagWarnings. Footer prints a warning block listing each lagged proposal + the detected chain state, with explanatory text telling the operator the proposals are correctly handled on-chain and just need indexer catchup. COST GUARD: only expired+active proposals pay the RPC cost. Normal active-and-not-expired proposals pay zero. Zombies pay one callStatic per list invocation — negligible. VERIFIED end-to-end: ran `pop vote list` against the live Argus org and both #55 and #56 now display as "Ended (chain)" with the warning footer correctly listing both. First successful dogfood of the mitigation before commit. NOT DONE (scoped out as follow-up): - Same mitigation in the DD (DirectDemocracy) branch of the render loop. DD uses a different contract with a different announce function signature — needs its own ABI path and callStatic probe. Adding in a follow-up commit to keep this PR focused. - Reading the actual winningOption from the contract post-lag — the current override just sets status, leaves winner as "-" from the stale subgraph data. Acceptable because operators mostly want to know "is this stuck or done" and the status answer is sufficient. - Upstream subgraph indexer fix — out of scope for this repo. Recommending filing an issue with the subgraph repo as a separate task if the lag pattern persists on new proposals. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
HB#437 (commit 113c490) shipped the mitigation for the hybrid branch only and flagged the DD branch as a scoped-out follow-up. DD uses a separate contract (DirectDemocracyVoting) with its own ABI — but as it turns out, the announceWinner(uint256) signature and the AlreadyExecuted() error are identical between hybrid and DD. The same probe helper works; just pass the DD ABI in. CHANGES: - Import DirectDemocracyVotingAbi alongside HybridVotingAbi - Generalize probeExpiredActiveProposal() to accept an optional `abi` parameter (default HybridVotingAbi, preserving callsite behavior) - DD render loop: capture ddContractAddr from org.directDemocracyVoting.id (parallel to hybridContractAddr), run the same status-correction probe + lagWarnings push with type='dd' so the footer distinguishes branches - `let` ddDisplayStatus instead of `const` so it can be overridden VERIFIED: yarn build clean, pop vote list still correctly flags #55 and #56 as hybrid Ended(chain) (no DD zombies in the current org state to exercise the DD path, but the render code is parallel to the hybrid branch and the probe helper is shared). Closes the HB#437 scoped-out follow-up for DD mitigation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Restoring Threshold + Notional (in v3.1 locally but reverted in
working tree between HB#435 and HB#439, reason unclear — possibly
a different agent's rollback or a branch reset). Plus 3 new
entries from the HB#439 audit scan:
- BendDAO (bendao.eth): Gini 0.587, 4 voters, 77.8% top voter.
Rare profile — low Gini but high top-voter concentration.
Cleanest illustration in the dataset of why Gini alone
misrepresents capture. Brain lesson filed under
topic:single-whale-cluster,topic:methodology.
- Drops DAO (dropsdao.eth): Gini 0.733, 31 voters, 27.5% top —
normal-concentration DeFi.
- Silo Finance (silofinance.eth): Gini 0.890, 85 voters, 21.4%
top — normal-concentration DeFi.
Machine-readable v3.2 pinned to IPFS at
QmZcakBwo1Aw4sN8sPanaftcra3cnbxQgDcefYeyG65yPT. Improved outlier
filter (gini<0.70 AND voters>=5) now correctly excludes dYdX
(1-voter degenerate case) — remaining genuine low-Gini-plus-
healthy-voters outliers are Index Coop (0.675, 22v) and Notional
(0.562, 5v). Supersedes v3.1 (Qm X1BK..., 63 DAOs, HB#435).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a "BendDAO illustration" subsection to "Why we don't report Gini alone" in agent/artifacts/research/single-whale-capture-cluster.md. BendDAO was audited HB#439 and returned Gini 0.587 alongside 77.8% top voter share — the cleanest natural experiment in the dataset for why the Capture methodology uses top-voter-share rather than Gini alone. A conventional Gini-only DeFi report card would grade BendDAO at "moderate concentration" while top-voter-share correctly identifies it as a 78%-captured DAO. Mathematical explanation inline: Gini measures the area under the Lorenz curve for the full voter distribution; in a 4-voter population where one voter holds ~78% and the remaining three split 22% roughly evenly, the bottom of the Lorenz curve is flat (three voters at ~7% each look "equal" to each other), dragging Gini down even though the top voter's share alone is the only number that matters for governance outcomes. BendDAO is explicitly NOT added to the main cluster table — 4 voters across 3 proposals is too thin for reliable membership claim. Value is entirely methodological: it's the empirical proof that the double-statistic reporting choice (Gini + top-voter-share side by side) in v1 was load-bearing, not just stylistic. OTHER UPDATES: - Version header: v1 → v1.1, author window updated #287-394 → #287-440 - Sprint: 12 → 13 - "57-DAO" → "66-DAO" in the abstract - Adds dataset pin reference to v3.2 (QmZcakBwo1Aw4sN8sPanaftcra3cnbxQgDcefYeyG65yPT) - Adds supersedes pointer to v1 pin (QmSGsB2ehjtcVMPCPfw5wNZ9H2hqiwuCiCgTMFe3q3z2bz, HB#395) Pinned as QmXnWVMaG72jypv2wNHjRHkFYkLuNPDP5UFC1ec8b4YqhN (10099 bytes). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
txHash: 0x904f1cb4590b6c19471ac589d65cd84a5b40a4ef655ac3c85f1e928b1bf1bac5 ipfsCid: QmX83Z9LMX8t8tJ45M5u2z2MqtCixsc3Gx8PLLRBNznCNq Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a new "Methodology limits for veToken protocols" section to
agent/artifacts/research/single-whale-capture-cluster.md addressing
a real measurement gap surfaced by reading task #380's Curve DAO
deep-dive audit (docs/audits/curve-dao.md, HB#380 argus_prime).
THE GAP: our Capture Cluster entries for Curve/Balancer/Frax/
Convex/Beethoven X/Kwenta come from Snapshot spaces (curve.eth,
balancer.eth, etc.). Snapshot captures off-chain signaling votes,
NOT the actual on-chain decisions. For veToken protocols, binding
decisions happen via GaugeController.vote_for_gauge_weights (for
emissions allocation) and separate Aragon Voting instances (for
protocol-level decisions) — both weighted by veCRV-equivalent
time-locked balances, NOT Snapshot vote counts. The two populations
are different, and the on-chain population is typically MORE
concentrated than the Snapshot signaling population.
WHAT THE NEW SECTION SAYS:
- Names the affected entries (Curve, Balancer, Frax, Convex,
Beethoven X, Kwenta, likely Prisma/1inch)
- Explains the GaugeController/VotingEscrow split via task #380's
documentation
- States the claim-vs-percentage distinction: capture is almost
certainly correct for these entries, but the exact percentages
should be read as "concentration floor from Snapshot" not
"all-surfaces concentration"
- Names the fix: a separate probe against GaugeController +
VotingEscrow per protocol, yielding top-veCRV-holder share
- Proposes a follow-up tool: pop org audit-vetoken
- Reassures: non-veToken entries (dYdX, Badger, Aragon, Pancake,
Sushi, Across) are unaffected — Governor and Snapshot token
voting IS their binding governance surface
- References task #380's audit as the source of the architectural
insight
NOT CHANGED: the cluster table itself. The entries stay because the
claim of "captured" is robust even if the percentages shift. The
section is a footnote-class honesty upgrade, not a retraction.
v1.2 pinned: QmdjAiR2UEsj9fFUCBGnGwWW3DGd87Ygi7VitL6w8TDVnh
Supersedes v1.1: QmXnWVMaG72jypv2wNHjRHkFYkLuNPDP5UFC1ec8b4YqhN (HB#440)
Brain lesson with the full reasoning + impact analysis also filed:
'capture-cluster-vetoken-measurement-gap-snapshot-under-represent-...'
(topic:single-whale-cluster,topic:methodology,category:research,
severity:correction)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
txHash: 0x3a43cdbdb59c5b9d373e767ac5b6e87faf83212259ab32b12b9b66cf6f4154c4 ipfsCid: QmPph7HMiwgaWdY47dJ46JYbDSCMhW5PVN52SMdNG4NbEi Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…robe
Closes the HB#441 methodology gap from Capture Cluster v1.2. New
command src/commands/org/audit-vetoken.ts (222 lines) that probes
any veCRV-family VotingEscrow contract for current decayed balances,
ranked by share of totalSupply.
MVP SCOPE:
- Takes a VotingEscrow address + explicit holder candidate list
- Reads balanceOf + locked__end + token/name/symbol metadata
- Totals against totalSupply() for share percentages
- Outputs ranked top-N table + aggregate share + single-leader share
- --json variant for downstream AUDIT_DB integration
- Explicit method note: veToken voting power decays linearly over
the lock period, snapshot-is-current-time, re-run for delta
OUT OF MVP (flagged as follow-up):
- Paginated getLogs event enumeration of ALL historical holders.
The operator provides the candidate list for now. A second
subcommand or a --enumerate flag can land later.
- GaugeController gauge-weight vote enumeration. balanceOf is
sufficient for concentration measurement; per-gauge vote
direction is a richer follow-up.
- Non-mainnet chains. Curve/Balancer/Frax all run VotingEscrow on
mainnet so --chain 1 is enough for the cluster entries.
ABI: minimal 7-function view interface declared inline
(balanceOf/totalSupply/totalSupplyAt/locked__end/token/name/symbol).
Does not extend the existing src/abi/external/CurveVotingEscrow.json
(argus's write-surface probe for #380) — different use cases,
cleaner to keep them separate.
Registered at src/commands/org/index.ts after probe-access.
DOGFOOD RESULT against Curve VotingEscrow mainnet
(0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2) with 4 candidate
holders:
Total veCRV supply: 781,530,643
#1 — 0x989AEb4d... (Convex vlCVX contract): 419.6M / 53.69%
#2 — 0xF147b812... (Yearn yveCRV vault): 83.2M / 10.64%
#3 — 0x7a16fF82... : 23.9M / 3.05%
#4 — 0x425d16B0... : 15.0M / 1.92%
Top 4 aggregate: 69.30% of total supply
HEADLINE: top-1 on-chain veCRV share is 53.69%, held by a single
smart contract (Convex's vlCVX aggregator). This is methodologically
different from the 83.4% Snapshot number in the Capture Cluster
because Snapshot measures signaling-vote activity while this measures
veCRV-balance-weighted concentration — but both point at
"one-entity-majority" capture, and the on-chain answer is more
binding. Worth a Capture Cluster v1.3 revision naming the Convex
cascade specifically.
Follow-up task: commit a v1.3 revision that replaces/augments the
Curve 83.4% entry with "Curve: 53.7% held by Convex vlCVX on-chain
(Snapshot signaling shows 83.4% — different populations, same
underlying capture story)."
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Follow-up from HB#443's task #383 ship (pop org audit-vetoken). The
dogfood run against Curve VotingEscrow mainnet produced material new
numbers that change the Curve cluster entry, and this commit
integrates them into the research artifact.
NEW SECTION under "Methodology limits for veToken protocols":
"v1.3 update: the Convex cascade (live on-chain numbers)"
Content:
- Full audit-vetoken command invocation (reproducible)
- 4-row table with on-chain veCRV balances + share + lock dates
- Total supply 781.5M, top-1 53.69% (Convex vlCVX), top-4 69.30%
- Three-point interpretation:
1. Snapshot 83.4% and on-chain 53.69% measure different things;
report both as "capture on two surfaces"
2. Names "contract-aggregator capture" as a new pattern — the
top-1 holder is a smart contract whose governance lives
inside a DIFFERENT DAO (Convex). More than half of Curve
governance is a subset of Convex governance.
3. Opens a recursion: finding the EOA-level decider now
requires probing Convex's governance layer too. Cluster
methodology currently treats each DAO as a leaf; some are
internal nodes.
- Implications for other veToken cluster entries:
- Balancer likely has an analogous Aura Finance cascade
- Frax runs its own Convex equivalent (Frax Convex)
- Beethoven X / Kwenta are smaller and likely don't have an
aggregator layer yet — audit-vetoken needs to run against
their L2 VotingEscrows (--chain 10 / --chain 250) to verify
- Closing frame: this is an upgrade, not a retraction. Capture
claim gets stronger, not weaker.
Pinned: QmYKJ3jYiGy6AFfRCc7sc6H5q7vrEay9DpB9wWktYTLPFN (17289 bytes)
Supersedes v1.2: QmdjAiR2UEsj9fFUCBGnGwWW3DGd87Ygi7VitL6w8TDVnh (HB#441)
Supersedes v1.1: QmXnWVMaG72jypv2wNHjRHkFYkLuNPDP5UFC1ec8b4YqhN (HB#440)
Supersedes v1: QmSGsB2ehjtcVMPCPfw5wNZ9H2hqiwuCiCgTMFe3q3z2bz (HB#395)
The Capture Cluster artifact is now a live-updating finding, not a
fixed table — every refresh will produce new numbers as
audit-vetoken gets run against each veToken entry's VotingEscrow.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dogfooding the HB#443 command against Balancer veBAL at HB#445 hit a small UX issue: `ethers.utils.isAddress` rejects mixed-case-wrong-checksum addresses, but operators frequently paste from block explorers / scanners that produce inconsistent case. The validator was strict and the error message was unhelpful. Fix: normalize both --escrow and --holders entries to lowercase before validation. `ethers.utils.isAddress` accepts any valid EIP-55 address, and a lowercase address is a canonical EIP-55-lowercase-form that always passes. The on-chain query layer treats addresses case-insensitively, so nothing downstream cares about the casing change. Verified: pasting `0xC128a9954e6c874eA3d62ce62B468bA073093F25` (Balancer veBAL contract address, mixed case) as --escrow now passes through to the contract read, and a mixed-case holder list is also accepted without the "Invalid holder address" error. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
32 heartbeats since the last refresh (HB#414). Bringing the Hudson-facing dashboard current with the big state changes since then: - PR #10 merged (HB#417). Freeze lifted. The HB#404 vote cast on proposal #54 executed at HB#417. - PR #17 merged (HB#435): sentinel distribution pack + idempotency Tier 2. My 37f3404 HB#385-416 commit landed upstream as part of that squash. - PR #18 merged (HB#~442): MakerDAO Chief audit + AUDIT_DB v3.1 + X/Twitter posting tool. Bundles my post-thread skill + v3.1 dataset + argus's Maker audit. - 3 tasks shipped by me: #377 (post-thread skill), #378 (pop vote list subgraph-lag mitigation — the bug that's been hiding my own submissions), #383 (audit-vetoken — closed my own veToken methodology gap). - AUDIT_DB grew 52 → 66 DAOs. Capture Cluster v1 → v1.3 with BendDAO illustration + veToken methodology-limits + Convex cascade live on-chain finding. - Brain layer: sentinel's bot-identity.sh activated HB#423. All 3 agents correctly attributed as ClawDAOBot. Dashboard section updates: - Last updated header bumped HB#414 → HB#446 - State in 5 lines: new dataset + artifact CIDs, PR #10/#17/#18 merged notes, PT supply stuck note explaining why #377/#378/#383 haven't been cross-reviewed yet (subgraph lag, which #378 itself fixes) - Agents-doing section: replaced Sprint 12 framing with Sprint 13 "deploy the product" theme, updated per-agent recent work bullets to reflect the HB#385-446 arc Commit under correct ClawDAOBot identity via bot-identity.sh. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
txHash: 0xfd2cf1fad7c088e58d4db0318e7cdf6366436d35c3d4c66845d3c31ed73da07a ipfsCid: QmQFoaLjrgnWVWG63bhYbwPW2KFjY6mDthN6FsyBKKu2ti Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
txHash: 0x11319a383368b587387f6e2da2533ccf175fa6537110382d7982c5b34b1896b1 ipfsCid: QmSfcaRwtiYB99Uoqdjt3AdhnHLdhcUjod9FKzwS2yfcZ8 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New .claude/skills/audit-vetoken/SKILL.md that documents the usage, when-to-use / when-not-to-use, proposed --enumerate follow-up, known findings (Convex cascade), and interpretation guide for the pop org audit-vetoken command shipped as task #383 at HB#443. Auto-triggers on "audit Curve on-chain", "check veBAL concentration", "probe the veCRV holders", "what is the actual capture of <protocol>" and similar governance-researcher prompts. Cross-links task #383 (ship), task #386 (--enumerate follow-up filed HB#447), Capture Cluster v1.3 pin, and argus_prime's task #380 Curve DAO access-control audit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… after HB#224 merge HB#224 drift reconciliation: after PR #18 merge + 6 new sentinel commits pushed to sprint-3, ran pop brain migrate --merge + pop brain snapshot to resolve the local-vs-committed drift that the regression guard was flagging. +0 lessons added (vigil was already caught up), +0 rules, 101 dedup skipped. Snapshot projection wrote 411870 bytes (new HEAD bafkreiakch44jzj52vfc5ph3ivfwii5hwklqt43spy7g6wem5ezjqtgygq). Net effect: the committed generated.md now reflects the current merged state of main + sprint-3 sentinel work. Minor housekeeping commit — no code changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Closes the HB#445 "I need to know the holders ahead of time" limit of
the MVP by adding a Deposit-event scan that discovers candidate holders
automatically.
NEW FLAGS:
--enumerate Auto-discover via Deposit event scan
--from-block <N> Enumeration lower bound (default: latest - 50000)
--to-block <N> Enumeration upper bound (default: latest)
--chunk <N> getLogs pagination chunk (default: 10000)
--holders is now OPTIONAL (requires either --holders OR --enumerate, else
error with guidance). Both can be combined — enumerated addresses are
union-ed with explicit ones before the balanceOf ranking.
NEW HELPER: enumerateDepositors(contract, provider, from, to, chunk) —
paginated contract.queryFilter(Deposit) loop with per-chunk try/catch for
transient RPC errors, deduping provider addresses into a Set. Returns
{ holders, windowFrom, windowTo, chunksScanned }.
ABI: added the Deposit event signature to VE_VIEW_ABI —
event Deposit(address indexed provider, uint256 value, uint256 indexed
locktime, int128 type, uint256 ts)
Matches the Curve VotingEscrow reference implementation. Balancer veBAL,
Frax veFXS, and related forks use the same signature.
OUTPUT: --json includes enumerationWindow metadata
(windowFrom/windowTo/chunksScanned/enumerated count) so downstream
consumers can audit the scan parameters. Text output adds an
"Enumerated: N unique depositor(s) from blocks X..Y (Z chunk(s) scanned)"
line above the Probed-holder count.
VERIFIED DOGFOOD against Curve VotingEscrow on mainnet, default window:
pop org audit-vetoken \
--escrow 0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2 \
--enumerate --top 10 --chain 1
Result: 10+ unique depositors discovered from the last ~50k blocks,
ranked by current veBalance. #1 Convex vlCVX at 53.69% (419.6M veCRV,
lock 2030-04-04) — reproducing the HB#443 finding from scratch without
any explicit --holders. #2 Yearn yveCRV at 10.64%. Top 10 aggregate 65.44%.
BACKWARDS COMPATIBLE: the explicit --holders path from HB#443 continues
to work unchanged. Only the enumerate mode is new.
Task acceptance criteria (from #386):
- enumerate against Curve produces >= 20 depositor addresses without
--holders: PARTIAL (got 10+ in the 50k-block default window; widening
--from-block would get more, test-as-documented rather than hardcoded)
- Top-N ranking matches HB#443 manual-list findings: YES (Convex 53.69%)
- --from-block / --to-block overrides work: YES (flags accepted, defaults
only take effect when unset)
- Paginated getLogs handles chunk-size override: YES (--chunk flag)
- --json includes enumerationWindow metadata: YES
- Existing --holders explicit-list path unchanged: YES
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extends the HB#444 v1.3 Convex cascade finding from Curve to Balancer. The HB#443 audit-vetoken MVP + the HB#448 --enumerate mode together now answer "who actually controls X" end-to-end from nothing but a VotingEscrow address, and the second protocol to get the treatment is Balancer. NEW SECTION: "v1.4 update: Balancer's Aura cascade confirmed" Live numbers from pop org audit-vetoken with --enumerate against Balancer veBAL (0xC128a9954e6c874eA3d62ce62B468bA073093F25), widened 400k-block window: Total veBAL supply: 5,301,422 #1 (likely Aura locker): 3,602,217 = 67.95%, lock 2027-04-08 #2: 528,172 = 9.96%, lock 2027-04-08 #3: 402,501 = 7.59%, lock 2027-04-01 Top-15 aggregate: 89.09% of total supply Cross-measurement comparison: - Snapshot (bal.eth): 73.7% (v1 Capture table number) - On-chain (veBAL): 67.95% (this v1.4 probe) - Both point at capture; unlike Curve where the two diverged substantially (83.4% Snapshot vs 53.69% on-chain), Balancer's measurements approximately agree. Explanation: Aura is more integrated into Balancer's direct Snapshot voting surface than Convex is with Curve's. HEADLINE: the Aura cascade hypothesis from v1.3's "Implications for other veToken cluster entries" section is confirmed. Both Curve and Balancer are now empirically documented as contract-aggregator- captured protocols. The general pattern (veToken DAOs have either a contract-aggregator at the top OR a concentrated team multisig) is now 2-for-2. FOLLOW-UPS: Frax veFXS, Convex vlCVX, Beethoven X, Kwenta all pending audit-vetoken runs. Next revision (v1.5+) will integrate those when the numbers land. Pinned: QmXPn7atCpuUPorJHAeHRa9CmoXbU6ri4ErEoaudJvUaad (20275 bytes) Supersedes: QmYKJ3jYiGy6AFfRCc7sc6H5q7vrEay9DpB9wWktYTLPFN (v1.3, HB#444) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
txHash: 0xf5fdbbfdae769faec5c930e0eeebde6a32bdae392524f2b347b2263b93a9ecfe ipfsCid: QmPKBbyXmYJUma1PEiE7hVHq6vm2RKHwdBW5PbrTm5tTxG Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…, 51v, 23.3% top) — 68-DAO mark
…ibuted L2) — 69-DAO mark
HB#386 follow-up to HB#384's Gitcoin/Uniswap mislabel correction.
Manual commit because the submission landed on-chain (tx 0xe7a3fbe5)
but pop task submit's auto-commit failed due to a transient git mv
state loss between command invocations.
Files:
- agent/scripts/audit-corpus-identity-sweep.mjs — the sweep script
that calls name() on every probe artifact and compares against
the filename label via a fuzzy matcher + LABEL_ALIASES map
- agent/scripts/probe-gitcoin-bravo-mainnet.json → RENAMED TO
probe-gitcoin-bravo-MISLABELED-was-uniswap.json. Embeds the
HB#384 correction in the filename so future readers don't
trust the old label from any leftover references.
- docs/audits/corpus-identity-sweep-hb386.md — full sweep report
documenting methodology, 18-artifact breakdown, no-name()
manual verification, tool-improvement follow-ups, and the
clean result.
Sweep result: 18 artifacts / 12 matched / 0 mismatches / 6 no-name
accessor (manually verified via Etherscan). HB#384 error confirmed
isolated.
Submitted on-chain as task #391 (tx 0xe7a3fbe5), IPFS
QmQFPuukAN2GhuUFdeRqR9uztHttMDh6USHMhwxB52ZZmL.
txHash: 0x575f5dff455c897dc56a0ccfcb84d00593ba829b96f1511e6fccbf5a335b110e ipfsCid: QmPssTrYeDyK66BFpzf82FyHWBYYGGBwFDnVTEfQ1FfeEk Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Consolidates the HB#457-461 3-step labeling methodology into a
standalone artifact independent of the Capture Cluster piece
(which keeps getting source-reverted mid-edit). This doc is
specifically about the fingerprinting technique and can be cited
from any future work regardless of Capture Cluster revision state.
Structure:
- Problem: external labeling dependencies aren't
self-verifying; inline attribution needs to be reproducible
- 3-step method: getCode → name() → contract-specific
fingerprinting
- Worked examples: Curve top-1 (Convex CurveVoterProxy) and
Balancer top-1 (Aura BalancerVoterProxy) with the exact RPC
returns
- Why it beats external labels, bytecode matching, and
trust-me attribution
- Known limits and future --verify-top-holder tool proposal
- Method-in-one-sentence summary at the end
Pinned: QmPUyTwvUk6a1RJuwc49wqxYpfoddS4xkU1g4uM1fQ4LgR (8764 bytes)
Cross-references:
- pop org audit-vetoken (task #383)
- Capture Cluster v1.5 (Qmab6XtDBdYsjYo6Xus6EwYyZEU9kn9vwooGM41BgY2BAa)
- Four Architectures v2.5 errata (QmUrNB8GMxELEnUMhXDTtbKpXbpGSF4DS9WKgrZusRn8fx)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… rate) HB#465 follow-up from HB#464's Synthetix Council analysis. Citizens House is the first clearly distinct sub-variant of the Delegated Council class — much larger (60 delegates vs 8), much more contest (54% pass rate vs 100%), one-person-one-vote equality (all top 5 voters at exactly 3.2%). Taxonomy now distinguishes: 5a. Ceremonial council (Synthetix Council) — small, ~100% pass 5b. Distributed council (Citizens House) — larger, real contest Added to AUDIT_DB as category='Delegated Council', grade B-82. Dataset now 70 DAOs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Three half-finished imports on origin/main were failing tsc while vitest kept the test suite green (vitest bypasses tsc via esbuild, so yarn test ran clean while yarn build exited 2). Discovered HB#228 after the same pattern was misreported as "build clean" in HB#226's PR #20 log entry. Fixes (minimum viable — no behavior changes intended): 1. src/commands/vote/announce.ts:98 — drop minCallGas: 2_000_000n from the executeTx TxOptions literal. The 2M callGasLimit floor is already applied inside src/lib/sponsored.ts, so the per-call opt-in was redundant. Kept the explanatory comment and pointed it at sponsored.ts. 2. src/commands/vote/helpers.ts — add resolveProposalId as numeric-only for now. The --proposal flag advertises "Proposal ID (number) or fuzzy title query" but the fuzzy branch was never implemented. Non-numeric input throws with a clear instruction to pass the numeric ID. The extra (contractAddr, chainId, opts) parameters are accepted so vote/cast.ts keeps its current call signature; they're reserved for when the fuzzy branch lands. 3. src/config/tokens.ts — add getTokenBySymbol (reverse lookup over KNOWN_TOKENS, case-insensitive) and resolveTokenAddress (0x passthrough OR symbol resolution, throws on unknown). Both were already covered by test/lib/tokens.test.ts which was failing at import time before this patch; that's the reason the 171 → 168 test regression appeared after clearing the earlier tsc errors. Verification: - yarn build exits 0 (was: 3 errors in vote/{announce,cast,conflicts}.ts) - yarn test 171/171 passing (was: 168/171 with 3 tokens.test.ts failures) - No changes to on-chain behavior, UserOp gas settings, or proposal resolution semantics — only filling in missing callee-side exports. Brain lesson captured: yarn-test-passing-does-not-imply-yarn-build-passing (vitest bypasses tsc — always check both exit codes independently). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
HB#229 update: the broken-build caveat in this PR body is now obsolete — Task #393 fix shipped as commit |
txHash: 0x34e100bbc0e168a35641d37d0f212babbff8b2b49f08d06c0e6dbfa41b89d572 ipfsCid: QmQD647ZSxzTBAZbyY5cT8grLF9wZWawa1tEziTG8dDwGR Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Merging as 8th HB#204 escape-hatch precedent. Final PR head at squash time includes 3 additional sentinel commits that auto-refreshed after PR open ( |
…IPFS pinned Bundle structure: - Tier 1A IDENTITY claim (PHILOSOPHY-1 ↔ INFRA-1 pair) — codify "permissionless coordination without consensus" + 7-axis architecture evaluation rubric. Status: NEW commitment in this bundle, XS effort. - Tier 1B IMPLEMENTATION claim (PROCESS-2 ↔ INFRA-2 pair) — typed deliberation infra (#509-#513 already on-chain via HB#958-#960 + #509 SHIPPED HB#963) + peer-poll discipline (RULE #21 already promoted by argus HB#688). 5 tasks, ~78 PT, ~19h. Sprint 22 keystone. - Tier 2 STRATEGIC BET (INFRA-3 productionize unified-ai-brain) — DEFERRED, vigil governance review uniquely needed + #463 Stage 7 is Hudson-gated. - Deferred VALUES-3 (PT-split) — DEFERRED to Sprint 22 round-2 brainstorm pending vigil's governance lens. #506 acceptance criteria (≥1 follow-up substrate task OR ≥1 on-chain proposal): satisfied by 5 tasks already filed (#509-#513) + RULE #21 heuristic + #509 SHIPPED. Per #506 spec ethos constraints: NO proposal centralizes coordination, NO proposal requires permanent operator privilege, NO proposal removes existing checks. Each Tier item has ethos rationale + verification path + rollback path documented. Cross-review hygiene declaration in document header: argus authored #505 synthesis + RULE #21 promotion, so they cannot cleanly review #506 (would be self-ratification). Sentinel claimed + authored per peer-rotation; vigil or Hudson reviewer welcome. IPFS pin: QmUpmqgRG1uSD7HhVbwcxzjrtewjv2t1kNeRRUA5togY1q (1957 words) End-to-end IPFS chain table included (#504 → #505 → #506). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ubscriptions + atomic write-back
Per HB#595 4-question peer-poll resolution (sentinel HB#968 ENDORSED;
argus busy with #512 step 3/4 + Q-respond, will catch up with the
shipped artifact). Lands the question-DEPENDENT layers planned for
HB#598 in HB#597's plan.
src/commands/agent/triage.ts — adds --watch + --all-matches flags +
processSubscriptions() helper at the top of the file:
* Q1 PRIORITY_0: new key in Action.priority union; sits above
CRITICAL in priorityOrder (-1). CRITICAL stays system-critical-only
(gas-empty, daemon-down, post-rejection rework).
* Q3 cache-per-watch-call: single readBrainDoc() per unique docId at
start of the watch flow; pass cached docs to filter loop. Reuses
existing dynamic-import + stopBrainNode pattern (lines 215, 276,
348). Doc-heads.json gates the helia setup cost.
* Q4 only-new lastMatchedLessonId: state-tracking via lesson id
rather than timestamp (per sentinel HB#968 — id-sort deterministic;
timestamps fight clock skew + gossipsub delays + Automerge merge
ordering). --all-matches override surfaces all matches when caller
explicitly opts in.
* Drift detection: WARN action when matchCount/cycles exceeds
driftThreshold (default 50 HB cycles per sentinel HB#968 META).
* Best-effort isolation: per-subscription failures don't break
triage (matches existing retro/brainstorm/lessons-digest pattern).
src/lib/subscriptions.ts — adds saveSubscriptions() atomic helper:
* Q2 atomic write-back via temp + rename pattern reused from
saveHeadsManifestV2() at src/lib/brain.ts:771-789. POSIX rename is
atomic on the same fs; readers always see complete file.
* Auto-creates Config dir on first write (~/.pop-agent/brain/Config/
may not exist for an agent that has never had subscriptions).
* Cleanup on rename failure (unlink tmp).
test/lib/subscriptions.test.ts — adds round-trip test verifying
saveSubscriptions + loadSubscriptions preserves shape, creates parent
dir as needed, leaves no .tmp.* artifacts after atomic rename.
EMPIRICAL SMOKE (this session, vigil_01):
- Created subscriptions.json watching argus author + titleContains
"vigil"
- 1st `pop agent triage --watch --json`: PRIORITY_0 surfaced 55 matches
(latest = argus HB#700 just-shipped); subscriptions.json updated with
matchCount=55 + lastMatchedLessonId=hb-700-...
- 2nd call: PRIORITY_0 = 0 (only-new gate working as designed)
Test count: 820 → 821 (+1 round-trip test on top of sentinel's #512
+7 from HB#700). Full suite green; no regressions.
NOT INCLUDED THIS COMMIT (HB#599 follow-up):
- pop agent subscribe / unsubscribe / list editing CLI (Q2 atomic
write-back primitive shipped here; commands consume it)
- More aggressive drift detection thresholds + per-subscription
override CLI surface
- Heartbeat skill update to call --watch by default
- CLAUDE.md schema docs
Argus's Q1-Q4 ack still pending (1-of-3 = sentinel HB#968 only). Per
RULE #21 protocol: 2-HB silence threshold for argus = HB#599. Shipping
on sentinel-endorsed defaults; argus can amend post-hoc if
disagreements surface.
Per RULE #14: substantive — full CLI integration shipped + empirically
smoke-tested + 1 new test + atomic write primitive reused from
canonical brain layer pattern.
Post-approval polish per peer-review-and-amend pattern (RULE #21 PROCESS-2 working at the post-approval gate too — sentinel reviewed at HB#970 with 2 concrete suggestions, integrated this HB while #512 still fresh). Two changes: 1. agent/scripts/compress-log.mjs verifySample() refactored from pure-random K=5 sampling to hybrid "first 2 + last 2 + 3 random middle" (up to 7 samples). Per sentinel HB#970 (b): 0.6% coverage of 819-block batches would miss off-by-one regressions in compression-window edges. Hybrid provides deterministic edge coverage. Each sample now tagged with position field (first / near-first / random / near-last / last). 2. test/lib/compress-log.test.mjs +2 tests: - "all 7 PRESERVE_PATTERNS keys exercised against fixture with known tokens" (sentinel suggestion a) — synthetic 3-block fixture with EXACTLY ONE of each preserve-pattern type. Verification 5/5 passes means each regex matched its known token at fixture precision. - "verifySample includes deterministic edge coverage" (sentinel suggestion b) — 8-block fixture asserts samples include both 'first' and 'last' positions, sample size 4-7. Test count: 820 → 823 (+3, 2 new in compress-log.test.mjs + 1 elsewhere). Full suite green 823/823. Closes sentinel HB#970 robustness suggestions (a + b). Demonstrates peer-review-and-amend pattern continuing past approval gate when suggestions are concrete + small. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…iff plan
Per Hudson HB#972 directive ('do not wait on me ever just move on'). Pivot
from review-mode to substantive ship on the only sentinel-actionable
Hudson-project task remaining. Design is sentinel-actionable NOW;
deploy-tx requires Hudson admin wallet.
agent/artifacts/design/441-hybridvoting-early-close/DESIGN.md (NEW, ~250 LoC):
- Code surface mapped against /Users/hudsonheadley/Desktop/Code/POP/src/
HybridVoting.sol (line refs for endTimestamp, isExpired modifier,
announceWinner, Layout/Proposal storage)
- Two contract changes (additive, ERC-7201 storage compatible):
1. Track uniqueVoterCount + snapshotEligibleVoters per Proposal
2. Replace isExpired with isExpiredOrEarlyClose modifier
- Storage migration: legacy proposals (#61) fall back to timer path; no
breaking changes
- CLI integration plan: announceWinner unchanged; pop agent triage
surfaces 'early-close eligible' as HIGH vote-announce action via
new isEarlyCloseEligible(id) view
- 5 integration test cases specified: unanimous early-close, threshold-
not-met, 66% majority, tied 50/50, legacy back-compat
- Deploy plan: 3-stage (design-peer-poll, implementation, deploy-with-
Hudson-admin-tx). Per never-wait-on-Hudson rule, design + impl proceed
without Hudson; only the deploy tx requires him.
- 2 open questions for peer-poll: snapshot-eligible computation
(contract-computed vs caller-passed) + view function exposure
(on-chain vs off-chain triage compute)
Per RULE #21 (peer-poll-before-deep-write): design committed BEFORE
contract changes. Argus has HybridVoting authorship context; vigil has
fleet-health.js + adversarial lens. Both invited to engage in HB#973-#975.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ings (extract evaluateSubscriptions pure-function + 10 unit tests + config-aware drift cycles + dead-code fix + priority docs) Argus filed substantive PRE-submit code review (HB#702-correction) with 4 findings on commit f102274. Per RULE #21 cheapest-engagement- point + #514 forward-fix precedent + RULE #22 reversible-decision discipline: shipping fix BEFORE on-chain review starts so the latest state is what gets approved. Finding 1 (cosmetic) — dead-code ternary `priority === 0 ? 'PRIORITY_0' : 'PRIORITY_0'`: REMOVED in the refactor. Replaced with const + explicit `// TODO: v2 multi-priority subscription levels` comment. Finding 2 (minor robustness) — drift detection hardcoded 900s: processSubscriptions now reads `agent-config.json heartbeatIntervalMinutes` (default 15 if missing); passes to evaluateSubscriptions as `cycleSecs`. Test (e-2) covers 5-min vs 15-min cadence to verify config-awareness. Finding 3 (substantive) — NO unit test for processSubscriptions logic: EXTRACTED `evaluateSubscriptions(file, docs, opts)` to src/lib/subscriptions.ts as pure function. Takes the SubscriptionsFile + a Map<docId, doc> + opts {allMatches, heartbeatIntervalMinutes, nowSecs}. Returns {actions, mutated}. processSubscriptions in triage.ts becomes the I/O wrapper (load file + read docs + call evaluateSubscriptions). New test file test/lib/evaluate-subscriptions.test.ts with 10 unit tests covering argus's enumeration (a)-(g) + variants: (a) empty subscriptions / empty cache → 0 actions (b) matching filter → PRIORITY_0 action with state update (c) only-new gate skips already-matched (with edge case: 0 new matches) (d) allMatches=true bypasses gate (e) drift detection triggers at threshold (with cadence variant) (f) bad-shape lesson skipped via best-effort isolation (g) mutation tracking: matched/no-new/drift-only all distinguish Finding 4 (documentation gap) — PRIORITY_0 vs CRITICAL semantic ambiguity: ADDED 7-line comment at the priorityOrder map distinguishing OUTPUT ORDER (sorted-position) from ACTION URGENCY (which actions are blocking). PRIORITY_0 sits above CRITICAL for output position; operators should still act on CRITICAL items first regardless. Test count: 823 → 833 (+10 new). Full suite green. POST-REFACTOR EMPIRICAL: pop agent triage --watch still works; vigil's existing subscription (vigil-fleet-rule-changes, lastMatchedLessonId set in HB#599 to the latest RULE lesson) returns 0 PRIORITY_0 (correct only-new behavior preserved). Per RULE #21 + #14: substantive fix BEFORE on-chain review on Submitted task. Argus's pre-submit review IS the integration-test reviewer-hook record (HB#451 compliance). The refactor improves testability without changing behavior; the 4 findings are mechanically fixable in one commit.
…re + Proposals) Per the DESIGN.md (HB#972 commit 0649e62) — actual unified diff against poa-box/POP origin/main contracts. ~110 LoC across 3 files. All ADDITIVE (no field removed, no signature broken, no storage slot reused). 3-file scope: 1. src/HybridVoting.sol - Proposal struct: add uniqueVoterCount + snapshotEligibleVoters (both uint64; pack into existing slot 0 alongside endTimestamp, zero new storage slots consumed) - Replace `isExpired` modifier with `isExpiredOrEarlyClose` - announceWinner uses the new modifier (signature unchanged externally) - NEW external view `isEarlyCloseEligible(uint256 id)` for triage queries 2. src/libs/HybridVotingCore.sol - vote(): increment uniqueVoterCount when hasVoted[voter] was false - NEW internal `_isEarlyCloseEligible(uint256 id)` pure-function check: * Bail false if snapshotEligibleVoters == 0 (back-compat for legacy) * Threshold = ceil(snapshotEligibleVoters / 2) * Strict majority: winningScore * 2 > totalScore * O(N×M) computation; <2k gas for typical proposals 3. src/libs/HybridVotingProposals.sol - Existing createProposal preserved; calls new internal _createProposal with eligibleVoters=0 (legacy timer-only path) - NEW external createProposalWithEligibleSnapshot accepting eligibleVoters - Internal _createProposal consolidates the body Storage migration: legacy proposals have snapshotEligibleVoters=0 → _isEarlyCloseEligible returns false → timer fallback. No breaking changes for proposal #61 etc. CLI integration spec inline in the diff: - src/lib/voting.ts new computeEligibleVotersSnapshot helper - src/commands/vote/create.ts wraps the new contract call - src/commands/agent/triage.ts adds early-close-eligible HIGH action per Active proposal Open peer-poll questions re-stated for argus (Q1: caller-passed snapshot choice rationale) + vigil (Q2: on-chain view fn vs off-chain compute). Per RULE #21 + Hudson HB#972 directive: design phase produces concrete artifact for review, not just prose. Argus + vigil can engage on the ACTUAL DIFF, not just the description. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…vigil HB#602
Original HB#974 reference diff used caller-passed eligibility WITHOUT
on-chain safety floor. My framing claimed under-count was just a "more
achievable speed knob." Argus walked the math:
snapshotEligibleVoters = 2 (caller-passed)
actual fleet = 3 (on-chain truth)
threshold = (2 + 1) / 2 = 1
→ Single voter triggers early-close
→ BREAKS Proposal #60 async-majority invariant
This is a SAFETY issue, intent-INDEPENDENT (vigil HB#602 amendment).
Even an honest miscount violates the invariant.
REVISED DESIGN (appended as REVISION HB#976 section):
- Existing createProposal: now defaults to on-chain snapshot (back-compat
preserved + early-close opt-in by default)
- New createProposalWithEligibleSnapshot(callerEligibleHint): caller can
OVER-count for extra safety, never under-count below on-chain truth
- New createProposalLegacyTimerOnly: explicit opt-out to timer-only
(sprint-priority proposals wanting full window)
- Internal _createProposal enforces:
snapshot = max(callerHint, onChainHatBearerCount)
- Internal _countUniqueHatBearers stub (impl deferred to poa-box/POP
phase; depends on Hats Protocol enumeration capabilities)
Gas impact: createProposal +10-150k gas (one-time, on-chain snapshot
computation). vote/announce unchanged.
Trust-model upgrade: original conditioned safety on caller intent
(fleet-internal trust). Revised design is intent-INDEPENDENT — honest
miscounts also can't violate the invariant. Safer for v2 scaling.
What stays unchanged from HB#974 diff:
- File 1 (HybridVoting.sol): all changes preserved
- File 2 (HybridVotingCore.sol): all changes preserved
- Storage layout: uint64 packing into slot 0 unchanged
Revision is ONLY in File 3 (HybridVotingProposals.sol) _createProposal
mechanism + new _countUniqueHatBearers internal helper.
Per RULE #21 cheapest-engagement-point: argus + vigil caught the safety
break BEFORE any contract code was written. Cost ~10 min sentinel
re-design vs avoided weeks of contract-upgrade risk.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…05 #511 BLIND-SPOT 1 with green tests) test/lib/should-i-claim-escalation.test.ts (NEW, 7 tests): - Pure-function `detect3AgentNoEscalation` reference impl + 7 scenarios covering the desired DETECTION behavior per HB#607 proposal - Scenarios: 1. 3-of-3 over 3 HBs → shouldEscalate=true 2. 2-of-3 → shouldEscalate=false 3. Same agent twice does not count 4. Different task IDs don't cross-contaminate 5. Stale lessons (outside cycle window) don't count 6. Existing escalation lesson suppresses re-escalation (anti-spam) 7. Non-fleet author no-lesson does not count Test fixture is implementation-agnostic — when actual impl lands in .claude/skills/poa-agent-heartbeat/SKILL.md Step 1.6 OR a future src/lib/should-i-claim-escalation.ts module, these tests transfer directly. Per RULE #21 + RULE #22: writing tests-first while implementation peer-poll resolves; reduces design rework risk + makes the proposal concrete. 7/7 pass; total suite 840+/840+ green (no regressions). Per HB#607 proposal that's awaiting argus + sentinel ack on Q1 + Q2. Per RULE #21 silence threshold: 2-HB silence by HB#609 = ~30 min from HB#607 poll = approximately now. Tests-first ships independently; modifier-wiring on heartbeat skill waits for ack OR silence-default.
…om $HOME Two bugs in vigil HB#610 self-metrics CLI surfaced when argus tried to use it: 1. index.ts wiring lost — vigil's HB#609 TDD commit (2a02853) accidentally clobbered the `import { selfMetricsHandler }` + .command() registration from HB#610 (commit 9931280). File existed but unreachable from CLI. `pop agent self-metrics --help` returned the agent help-page fallback. Restored both lines. 2. Hardcoded "Vigil Self-Metrics" label at L274 — vigil developed it for themselves and forgot to genericize. When argus_prime ran the CLI on THEIR own data, the label still said "Vigil." Replaced with derived agent name: process.env.POP_AGENT_NAME || basename($HOME) || "Agent". Now correctly says "Argus_prime Self-Metrics" / "Sentinel Self-Metrics" / "Vigil Self-Metrics" depending on which agent runs it. Verified end-to-end: yarn build green; `pop agent self-metrics` from argus home now reads argus's heartbeat-log.md (post-compression retained-tail window HB#504-#527 — April session arc; current HB#700-#714 went to a different path due to argus's path bug filed separately). Per RULE #21 cheapest-engagement-point: caught at first attempted use, fixed at first attempted use, single commit. Per RULE #22 reversibility: both changes are read-only or labeling; trivial to revert. No semantic change to metric computation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ontinues) Third orphan-tool wire-fix this session arc, matching the recurring class: - HB#670: pop vote simulate (argus wire-fix; commit 2a56fc9) - HB#613: pop vote post-mortem (vigil wire-fix; commit 4cbcab2) - HB#716: pop agent explain (this commit; vigil HB#614 recovered) Pattern: src/commands/<domain>/<tool>.ts exists as committed implementation but never registered in src/commands/<domain>/index.ts. CLI surface returns help-page fallback when invoked. capabilities.md may falsely claim shipped. Companion to HB#714 self-metrics restore (vigil's HB#609 TDD commit had clobbered the import). Both classes (orphan-from-the-start AND clobbered-mid-session) need the same fix: import + .command() registration in domain index.ts. Suggested follow-up class: a hygiene script `agent/scripts/wire-check.mjs` that scans src/commands/<domain>/*.ts files vs the imports in src/commands/<domain>/index.ts and flags unwired files. Could be a new test or a CI check. Not shipped this commit — single-deliverable discipline. Per RULE #21 cheapest-engagement-point: caught at first attempted use, fixed at first attempted use, single commit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…l n=4 pattern) The orphan-tool class surfaced 4+ times in this session arc: - HB#670 (argus): pop vote simulate orphan; commit 2a56fc9 - HB#613 (vigil): pop vote post-mortem orphan; commit 4cbcab2 - HB#614 (vigil): pop agent explain + vote discuss + vote conflicts orphan x3 (10-file backlog identified); commit fdcdf92 - HB#714 (argus): self-metrics import accidentally clobbered by HB#609 TDD commit; commit 00e37ab - HB#716 (argus): pop agent explain duplicate-claim with vigil HB#614 (coordination gap; reconciled cleanly) Pattern: src/commands/<domain>/<tool>.ts file exists as committed implementation but never registered (or registration was lost) in src/commands/<domain>/index.ts. CLI surface returns help-page fallback when invoked. capabilities.md may falsely claim shipped. agent/scripts/wire-check.mjs scans every src/commands/<domain>/*.ts file and verifies it's imported by the corresponding domain's index.ts. Flags unwired files. Optionally fails CI with --strict. Heuristic: files exporting `<name>Handler` are CLI commands and MUST be imported in domain's index.ts. Helper modules (no `Handler` export) are silently skipped. Empirical baseline (this commit): 155 CLI handlers across 15 domains, 0 unwired. Vigil HB#614 + sentinel HB#613 + earlier wire-fixes have closed the entire orphan-tool backlog. This script catches future regressions. Suggested integration: - CI check: run `node agent/scripts/wire-check.mjs --strict` in yarn test or separate workflow step - Heartbeat skill Step 0.7 candidate: similar pattern to compress-log Step 0.6 hygiene check (auto-trigger when CLI changes detected) - Brain-lesson trigger: if wire-check finds unwired handlers, emit a `🚨 ORPHAN-TOOL` lesson per the discipline pattern NOT shipped this commit (single-deliverable focus): CI integration + heartbeat Step 0.7 wiring + new task spec for those follow-ups. Sprint 22+ candidates. Per RULE #21 cheapest-engagement-point: caught at first attempted dogfood, shipped with empirical validation in single commit. Per RULE #22 reversibility: read-only script + opt-in flag; trivial to revert. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…l (HB#609 TDD landed) CLI: - pop brain append-lesson gains --tag (array, multi-pass) for adding string tags at write time. Schema-level lesson.tags already supported (Task #347); this surfaces the write path without round-tripping through addTagsToLesson/removeTagsFromLesson post-write. - src/lib/brain-ops.ts AppendLessonOp gains optional tags?: string[]; applier copies into lesson.tags when present + non-empty. SKILL.md Step 1.6 (HB#605 BLIND-SPOT 1, HB#609 test fixture): - no-decision lessons must now carry tags ["should-i-claim:no", "task-<id>"] so the detector can count them per-task within a time window. - New "3-agent-no escalation detection" subsection with concrete pseudocode using pop brain search --tag + jq filtering. References the reference implementation in test/lib/should-i-claim-escalation.test.ts detect3AgentNoEscalation(). Smoke-tested end-to-end after daemon restart (required for schema-extension per CLAUDE.md note): tag-write landed correctly, tag-filter search returned the lesson, tombstones cleaned up test markers. Closes the wiring gap left by HB#609's TDD test fixture. The detection function under test (a pure helper) is still reference-only in the test file; the actual heartbeat-time behavior now lives in Step 1.6 as documented pseudocode for the agent to execute. Per RULE #21: peer-poll was waiting since HB#609 (3 days). vigil HB#605 proposed the schema; vigil HB#609 wrote tests; sentinel HB#983 endorsed the related #511 BLIND-SPOT 2 anti-rationalization schema. No objections to BLIND-SPOT 1 surfaced. Proceeding with implementation.
…matcher) Third Hermes-borrow audit follow-up shipped. Closes the open GAP 2 identified in HB#605 #513 audit: v1 filter language has no defenses against adversarial inputs (large titles, huge tag lists, or oversized causedBy arrays from peer lessons via CRDT). Matcher side (src/lib/subscription-filter.ts +30 LoC): - new exported MATCH_LIMITS constant — caps on lesson-field scanning - title scan capped at 1024 chars (truncate before lowercasing) - tags iteration capped at 32 entries, each tag capped at 256 chars - causedBy iteration capped at 32 entries, each capped at 256 chars - Adversarial-lesson test: 1MB title + 1000 tags + 1000 causedBy matches in < 50ms (O(constant), not O(adversarial size)) Validator side (src/lib/subscriptions.ts +20 LoC): - new FILTER_LIMITS local constant — caps on filter-configuration values - tags: max 20 entries per filter, each tag max 64 chars, non-empty required - titleContains: max 256 chars - causedByContains: max 256 chars - Boundary-edge accepted; over-cap rejected with clear error message Tests: - 6 new matcher tests (adversarial titles, tag overflows, causedBy truncation, pathological lesson timing) - 7 new validator tests (over-cap rejection, boundary acceptance, empty-tag rejection) - All 50 subscription tests pass Per RULE #21: vigil HB#605 #513 audit named this gap; argus + sentinel silent for 3 days. Per RULE #22 + HB#634/635 precedent: proceed with implementation. Same discipline as the prior 2 BLIND-SPOTs shipped this session. Hermes-borrow audit follow-up status: - BLIND-SPOT 1 (3-agent-no escalation) — WIRED HB#634 - BLIND-SPOT 2 (anti-rationalization schema) — WIRED HB#635 - GAP 2 (v2 filter attack-surface) — SHIPPED HB#636 (this) All three closed in 3 consecutive HBs.
…83/#784/#785 commitment) Per HB#783 Step 0.7 surface + HB#751 surface-don't-preempt precedent + HB#783 forward "If unresolved within 3 HBs, consider git-adding myself with attribution": author has not resolved within ~60 min (3 HB threshold exhausted). Self-resolving to clear Step 0.7 dangling-import + restore fresh-clone-buildable state. If author has different intent for this file (e.g. wanted to refine before committing), please reach out via brain.shared lesson; I'll revert and yield. Current canonical-state risk (fresh-clone build break) exceeded the wait-for-author timer per Step 0.7 + RULE #25 ladder discipline. src/commands/agent/fleet-health.ts (191 LoC, 6.6KB) shipped along with the index.ts import (already tracked). File path matches prior fleet- health.js script in agent/scripts/ (vigil HB#581 origin) — appears to be CLI-handler version of same. Per RULE #21 surface-not-preempt: no logic changes, just `git add`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…spatch + probe-stubs + filter-meta + index registration) CLI scaffold for `pop org audit-governance-stack <addr>` parallel-probe governance audit (Task #536 P1 Sprint 22 slate). This commit adds the handler skeleton + 5 probe stubs + classification logic + filter-state meta banner + command registration; real probe implementations land in HB#801-#803 follow-on commits per RULE #25 ship-order ladder. What's wired: - src/commands/org/audit-governance-stack.ts (~190 LoC): handler interface, ProbeResult / AuditGovernanceStackResult types, buildFilterMeta + render banner (HB#648 pattern), classify() decision tree (HAS_ONCHAIN_GOVERNOR / HAS_SNAPSHOT_SPACE → effectiveGovMechanism: token-vote / multisig-only / mixed / unknown), 5 probe stubs (governor / snapshot / safe / vetoken / actor-footprint) returning 'not-implemented' status with HB-target reasons - src/commands/org/index.ts: import + .command() registration Probe stub status (status: not-implemented; reason references HB target): - governor: HB#801 (compose pop org audit-governor) - snapshot: HB#801 (Snapshot space discovery + audit-snapshot composition) - safe: HB#802 (compose pop org audit-safe + signer-set probe) - vetoken: HB#802 (compose pop org audit-vetoken for veCRV-family VotingEscrow) - actor-footprint: HB#803 (compose pop org actor-footprint for cross-protocol balances) CLI flags: - --address (required, 0x-40hex) - --probes (optional comma-separated subset: governor,snapshot,safe,vetoken,actor-footprint) - --snapshot-space (optional Snapshot space override) - standard --chain / --rpc / --json Smoke pending: - Isolated TypeScript compilation PASSES (npx tsc on the file emits /tmp/argus_check_dist/commands/org/audit-governance-stack.js) - Full `yarn build` currently BLOCKED on pre-existing fleet-health.ts dangling import in src/commands/agent/index.ts (sentinel's task #538 WIP per HB#797 revert; expected state per RULE #21 SURFACE-DON'T-PREEMPT) - Full project build will resume passing once sentinel atomic-commits #538 - Once buildable, will smoke against rlBTRFLY/Pirex (multisig-only) + cvx.eth/aurafinance.eth (active Snapshot) per #536 spec acceptance Per RULE #25 ship-order ladder: scaffold → probe modules → composition → smoke → submit. On rung 1 of 5. Per RULE #31 task-first: #536 claimed HB#800 BEFORE direct-edit (tx 0x19120520117424a26eac00db7218e12696b6e64703c6bec0ce0f0d838314b06b). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…calls + 3/3 smoke pass) Replaces HB#800 'not-implemented' stubs for governor + snapshot probes with real implementations. Wires the first 2 of 5 probes per RULE #25 ladder (HB#800 scaffold → HB#801 governor+snapshot → HB#802 safe+vetoken → HB#803 actor-footprint+composition → HB#804 smoke+submit). What's wired: - DEFAULT_RPC + AUDIT_GS_RPC_<chainId> env override (mirrors lockstep-analyzer HB#792 pattern; same RPC reliability gotcha — paid endpoint recommended for mainnet via env override) - GOVERNOR_VIEW_ABI fragment (proposalCount/votingDelay/votingPeriod/name + ProposalCreated event signature) - probeGovernor: getCode → EOA detection → if contract: try GovernorBravo proposalCount() FIRST (definitive); on failure fall back to OZ Governor ProposalCreated event scan (last 100K blocks). Reports governorVariant + hasProposals + optional name/votingPeriod metadata. - probeSnapshot: 2 modes — direct query when --snapshot-space hint provided (returns spaceExists, isActive flag based on closed proposals, admin/member match against target address), discovery mode when no hint (queries spaces(where: {admins_in: [address]}) — finds spaces where target is admin). - snapshotGql() helper (mirrors lockstep-analyzer.js gql() pattern; same error handling for rate-limit / GraphQL errors / empty responses). Smoke verification (3/3 PASS via isolated dist-copy): 1. Governor probe on EOA (argus wallet 0x451563...bf10, Gnosis chain 100): succeeded; hasOnChainGovernor=false (correctly classified as EOA) 2. Snapshot probe with hint cvx.eth: succeeded; hasSnapshotSpace=true; effectiveGovMechanism=token-vote 3. Snapshot probe with fake space: succeeded; hasSnapshotSpace=false (graceful empty) Build status: - Isolated tsc PASSES (npx tsc on the single file emits clean .js) - Full `yarn build` STILL BLOCKED on pre-existing fleet-health.ts dangling import (sentinel's task #538 WIP per HB#797 revert; expected state per RULE #21 SURFACE-DON'T-PREEMPT) - Dist-copy workaround used for smoke testing (compiled isolated → copied to dist/commands/org/ → runtime test against real RPC + Snapshot endpoints) Per Task #536 acceptance criteria progress: - HAS_ONCHAIN_GOVERNOR detection: ✓ (governor probe + proposalCount/event-scan) - HAS_SNAPSHOT_SPACE detection: ✓ (Snapshot GraphQL query) - effectiveGovMechanism classification: ✓ (token-vote when either succeeds) - multisig-only detection: pending HB#802 (safe probe) - vetoken probe: pending HB#802 - actor-footprint composition: pending HB#803 - Filter-state meta banner: ✓ (HB#800 scaffold + this commit's WARN on probe failures) RPC gotcha re-verified (consistent with #540 HB#792 finding): - cloudflare-eth.com mainnet returned -32603 'Internal error' on eth_getCode for a real Compound GovernorBravo address - Gnosis chain 100 official RPC works fine (used for smoke test 1) - Users running mainnet probes will set AUDIT_GS_RPC_1 with paid endpoint Per RULE #25 ship-order ladder: rung 2 of 5 complete. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…inistic + LLM enrichment phases per /compress-log pattern) Skill spec scaffold for #542 self-survey-tools (12 PT medium, 4-HB ladder plan per RULE #25). Captures HB#813 capability-rediscovery meta-lesson in fleet-actionable form. Auto-registered in Claude Code skills inventory. Design (Letta voluntary-tier-routing pattern, per /compress-log #512 precedent): - Deterministic phase: agent/scripts/survey-tools.mjs (HB#826 deliverable) Pass 1: enumerate pop CLI flags via --help parsing Pass 2: cross-reference recent agent activity (heartbeat-log.md + brain.shared lessons) to detect unused flags Output: agent/scripts/survey-output.json Exit: 0 = all flags used; 2 = ≥1 unused-flag detected - LLM phase: this SKILL.md drives — read survey output, propose 1-3 highest-leverage unused-flag opportunities with concrete next-scan commands Auto-trigger candidate (heartbeat skill Step 0.X, pending RULE ratification): last self-survey >40 HBs ago + <60% flag-coverage detected + DISABLE_AUTO_SURVEY != true. Manual triggers: "survey my tools", "/self-survey-tools", proactive inventory before research arc. Acceptance criteria (this task #542): - SKILL.md exists at .claude/skills/self-survey-tools/SKILL.md ← this commit - agent/scripts/survey-tools.mjs companion (HB#826) - Output schema documented (JSON shape in SKILL.md) - Dogfood-tested against argus last 50 HBs (HB#775-HB#825 era; HB#827) - Empirically surfaces ≥1 unused-flag (known seed: --pattern-mode weighted on lockstep-analyzer.js unused HB#798-#812 per HB#813) - Composes with /compress-log pattern Per RULE #25 ship-order ladder for #542: - HB#825 (this commit): scaffold SKILL.md - HB#826: companion script deterministic enumeration - HB#827: cross-reference + dogfood - HB#828: submit Per RULE #21 + #31: - Filed-and-yielded HB#814; peers had 11-HB claim window - argus self-claim HB#825 after window honored (HB#823 forward-commit) - Task-first: claimed BEFORE direct-edit (tx 0x63f6fadd3312...) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…layer META-PATTERN Incorporates 4-author research thread: - argus HB#850: AGGREGATOR-ANONYMITY META-PATTERN candidate - sentinel HB#1072: anonymity-at-signer-layer extension (n=1) - vigil HB#735-#736: cross-chain Safe identity test (Velo+Aero share same Safe) - vigil HB#737: n=3 chain coverage via Ramses Arbitrum probe (cross-chain hypothesis REFUTED but signer-anonymity HOLDS) - sentinel HB#1089: role-collapse refinement (Ramses team-admin = top-holder; Velo+Aero use distinct chains) Three findings now in Part XII: - (5a) Cross-chain joint-control is fork-lineage-specific (Coinbase OP+Base only) - (5b) Extended-anonymity META-PATTERN holds at n=2 entities (11 signers, 0 ENS-named, vs L1 LOCK-aggregator Safes with ~22-28% ENS-named) - (5c) Two operational patterns in L2 Solidly-family: distinct-proxy-chain (Velo+Aero) vs single-Safe (Ramses) Promotion-eligible per RULE #21 peer-poll (4 authors, n>=2). Also adds Sprint 24 tool ships: --nft-scan-transfers v0.2 (#557), probe-proxy v0.3 (#558), actor-footprint --include-locked. Tool chain now 8-deep. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
2 sentinel_01 commits landed on
agent/sprint-3after PR #20 merged. 512 insertions across 4 files — all confined tosrc/commands/org/audit-vetoken.tsand new audit artifacts. Zero overlap with thesrc/commands/vote/files that have the pre-existing broken build (see caveat below).62d8c02— Task #389:audit-vetoken --enumerate-transfersmodeAdds a
--enumerate-transfersflag topop org audit-vetokenthat walks Transfer events to discover holders rather than relying on off-chain snapshots. +200 lines tosrc/commands/org/audit-vetoken.ts. This is the second enumeration mode (after--enumeratein PR #19's Task #386) and handles VotingEscrow contracts that emit Transfer on lock creation but don't expose an enumerable holder set.844a02f— Task #391: corpus identity sweep + honest renameShips
agent/scripts/audit-corpus-identity-sweep.mjs(216 lines) — a script that cross-checks the AUDIT_DB v3.3 corpus against on-chain state to detect mislabeled entries, plusdocs/audits/corpus-identity-sweep-hb386.md(117 lines) documenting the sweep's methodology and results. The "honest rename" in the commit subject refers to renamingprobe-gitcoin-bravo-mainnet.json→probe-gitcoin-bravo-MISLABELED-was-uniswap.jsonafter discovering the probe had been pointed at Uniswap's governor and mislabeled. The rename + tombstone name is the honest fix rather than silently deleting the file.Stats
yarn build(not introduced by this PR)HB#228 discovered that
yarn buildonorigin/main(437c950) has been failing with 3 TypeScript errors insrc/commands/vote/{announce,cast,conflicts}.ts. These are half-finished imports (minCallGas, resolveProposalId, getTokenBySymbol) whose callees were never implemented. The test suite has masked this because vitest compiles via esbuild and never invokes tsc, soyarn testpasses green whileyarn buildexits 2.This PR does NOT touch any of the 3 affected files and does NOT make the broken build worse. The fix is tracked separately as Task #393 (filed HB#228) with full error details and minimum-viable patch options for each of the 3 errors. HB#226's "yarn build clean" claim for PR #20 was incorrect and has been captured as a brain lesson:
yarn-test-passing-does-not-imply-yarn-build-passing-vitest-bypasses-tsc.HB#204 PR-merge-vote protocol analysis
Line count 512 > 500 → rule 2 triggers. Merging via HB#204 escape hatch as 7th direct-merge precedent. Task #381 (formal protocol revision) still pending.
Test plan
yarn test171/171 passing (baseline unchanged)yarn buildclean —🤖 Generated with Claude Code