docs(evidence): record task-4 EDGE-CASES.md QV follow-up correction evidence
This commit is contained in:
1 parent
7f37dab82c
commit
a3db0d9c85
1 file changed
+88
@@ -0,0 +1,88 @@
|
||||
PLAN TODO 4 — EDGE-CASES.md single-sentence correction (QV credit-forgery follow-up)
|
||||
=====================================================================================
|
||||
|
||||
TASK
|
||||
----
|
||||
EDGE-CASES.md's "Assembly / governance + Fair Draw" row carried a stale
|
||||
"Follow-up (off-limits root)" claim asserting putResidentCredit's unsigned
|
||||
CRDT credit value still forges vote weight. A prior adversarial pass hand-
|
||||
traced computeQvTally and confirmed vote weight is derived ONLY from the
|
||||
signed Event Log's own clamped ballot credits (via extractQvBallots), never
|
||||
the unsigned CRDT `.credits` field (used solely as a membership marker). This
|
||||
task corrects that one sentence to VERIFIED ALREADY FIXED, with real,
|
||||
freshly-read line numbers, and cross-references the still-real residual gap
|
||||
(Sybil/self-enrollment) to ECONOMY.md instead of duplicating it.
|
||||
|
||||
BEFORE (EDGE-CASES.md line 79, sentence only)
|
||||
----------------------------------------------
|
||||
**Follow-up (off-limits root):** `putResidentCredit` accepts any credit
|
||||
*value* via unsigned P2P CRDT — single-row value forgery remains; real fix =
|
||||
move credit grants onto the signed Event Log.
|
||||
|
||||
AFTER (EDGE-CASES.md line 79, sentence only)
|
||||
---------------------------------------------
|
||||
**Follow-up (verified already fixed):** `putResidentCredit` still accepts any
|
||||
credit *value* via the unsigned P2P CRDT, but that value is never the
|
||||
vote-weight source — hand-traced `extractQvBallots`
|
||||
(`src/lib/governanceEvents.ts:136-157`) into `computeQvTally`
|
||||
(`src/lib/governance.ts:269-339`) confirms weight is derived solely from the
|
||||
signed Event Log's clamped ballot credits, with the CRDT `.credits` field
|
||||
read only as a membership marker. Residual (disclosed, not duplicated here):
|
||||
Sybil/self-enrollment buying one extra vote at the clamped honest weight —
|
||||
see ECONOMY.md's "Personhood / Sybil resistance" bullet.
|
||||
|
||||
LINE NUMBERS CITED (read fresh from the current worktree, not guessed)
|
||||
-----------------------------------------------------------------------
|
||||
- `extractQvBallots`: src/lib/governanceEvents.ts, lines 136-157
|
||||
(grep -n "^export function extractQvBallots\|^}" confirmed function opens
|
||||
at 136 and its closing brace is at 157)
|
||||
- `computeQvTally`: src/lib/governance.ts, lines 269-339
|
||||
(NOTE: computeQvTally is defined in governance.ts, not governanceEvents.ts
|
||||
as the task brief's "look around lines 290-336" guess suggested — verified
|
||||
by `grep -rn "export function computeQvTally" src/`, which returned only
|
||||
src/lib/governance.ts:269; function opens at 269, closing brace at 339)
|
||||
|
||||
Trace confirmed at read time: computeQvTally reads `ownBallot.credits` /
|
||||
`DEFAULT_QV_CREDITS` (the signed, clamped ballot credit from
|
||||
extractQvBallots), clamps with `Math.sqrt(Math.min(declaredCredits,
|
||||
DEFAULT_QV_CREDITS))`, and only reads `resident.residentId` (membership) off
|
||||
the CRDT ResidentCreditRecord — never `resident.credits` for weight.
|
||||
|
||||
ECONOMY.md cross-reference verified
|
||||
------------------------------------
|
||||
`grep -n -i "sybil\|personhood" ECONOMY.md` confirmed a "Personhood / Sybil
|
||||
resistance" bullet already exists at ECONOMY.md:74, covering exactly the
|
||||
residual gap now cross-referenced (not duplicated) from EDGE-CASES.md.
|
||||
|
||||
git diff --stat (scope check — must be EDGE-CASES.md only)
|
||||
------------------------------------------------------------
|
||||
EDGE-CASES.md | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
git diff -- EDGE-CASES.md (full)
|
||||
-----------------------------------
|
||||
diff --git a/EDGE-CASES.md b/EDGE-CASES.md
|
||||
index 67f9f9b..cc31826 100644
|
||||
--- a/EDGE-CASES.md
|
||||
+++ b/EDGE-CASES.md
|
||||
@@ -76,7 +76,7 @@ Evidence: `.omo/evidence/edge-cases-browser/`. Admin seed invalid inputs rejecte
|
||||
## Domain adversarial matrices (six parallel agents)
|
||||
|
||||
### Assembly / governance + Fair Draw — 42 probes, 2 breaks fixed (74 tests green)
|
||||
-BREAKS #10, #11 (above). HELD: QV credits ≫ budget → finite sqrt weight; exactly-at-budget; negative/NaN/Infinity credits throw; delegation cycles A→B→A, 5-node, 10k-hop all terminate (no stack overflow); self/nonexistent delegation; double ballot counted once; zero ballots no NaN; Fair Draw tampered seed/salt → `verify()` false (never a winner); re-roll/second-reveal/no-prior-commit rejected; determinism; winner index in `[0,n)` across 250 draws. **Follow-up (off-limits root):** `putResidentCredit` accepts any credit *value* via unsigned P2P CRDT — single-row value forgery remains; real fix = move credit grants onto the signed Event Log.
|
||||
+BREAKS #10, #11 (above). HELD: QV credits ≫ budget → finite sqrt weight; exactly-at-budget; negative/NaN/Infinity credits throw; delegation cycles A→B→A, 5-node, 10k-hop all terminate (no stack overflow); self/nonexistent delegation; double ballot counted once; zero ballots no NaN; Fair Draw tampered seed/salt → `verify()` false (never a winner); re-roll/second-reveal/no-prior-commit rejected; determinism; winner index in `[0,n)` across 250 draws. **Follow-up (verified already fixed):** `putResidentCredit` still accepts any credit *value* via the unsigned P2P CRDT, but that value is never the vote-weight source — hand-traced `extractQvBallots` (`src/lib/governanceEvents.ts:136-157`) into `computeQvTally` (`src/lib/governance.ts:269-339`) confirms weight is derived solely from the signed Event Log's clamped ballot credits, with the CRDT `.credits` field read only as a membership marker. Residual (disclosed, not duplicated here): Sybil/self-enrollment buying one extra vote at the clamped honest weight — see ECONOMY.md's "Personhood / Sybil resistance" bullet.
|
||||
|
||||
### Housing + Tunnel Safety — breaks #8, #9 fixed (35 tests green)
|
||||
HELD: infeasible (more residents than capacity), zero slots/residents, all-equal tie determinism (20 runs), fairness-debt across 30 cycles (rotates, bounded, no starvation), impossible-constraint resident, negative/NaN space report rejected, duplicate slot ids safe; tunnel disconnected graph, all segments closed, start==end, unknown nodes, accessible-only routing, cyclic graph optimal, hazard on nonexistent segment ignored. **Follow-ups (by-contract):** negative edge weights → negative distance (weights documented `>0`); fractional sub-1 capacity from idle-hours scaling (intended).
|
||||
|
||||
COMMIT
|
||||
------
|
||||
docs(edge-cases): correct the stale QV credit-forgery claim - verified already fixed
|
||||
SHA: 58293155b9178a354a27b880fabdb211b417a87a
|
||||
|
||||
SCOPE NOTE
|
||||
----------
|
||||
No other row/claim in EDGE-CASES.md was touched, including the separate
|
||||
"Credit-value forgery (Assembly QV)" bullet elsewhere in the file (a
|
||||
different row discussing related but distinct wording) — per the task's
|
||||
explicit single-sentence-only scope.
|
||||
Reference in new issue
Block a user