mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
test(11b): un-quarantine nostr-count-fallback; document publish-rejection setup
nostr-count-fallback: STALE TEST after a refactor — countUnsupportedRelays moved from NostrClient to its ConnectionManager, and the test read it off the client (undefined.has). Repointed the assertion at client.connectionManager .countUnsupportedRelays. No behavior change, no assertion weakened. Also recorded the precise multi-precondition diagnosis for the still-quarantined nostr-publish-rejection (dev-mode override before the first dynamic config import; then a NIP-71 invocation sub-test) in the QUARANTINE note + TODO, so it's a quick finish next time. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
fe653706a1
commit
ce4f006e9d
3 files changed
+18
-8
No files matched your search
@@ -14,10 +14,9 @@ process.env.NODE_ENV = "test";
|
||||
// failing on main, unnoticed). Each entry MUST cite why and link the triage item.
|
||||
// Remove an entry as soon as its file is fixed. See todo/TODO_2026-06-20_pre-launch.md todo-11b.
|
||||
const QUARANTINE = new Map([
|
||||
["tests/user-blocks.test.mjs", "HANG — triage todo-11b"],
|
||||
["tests/nostr-count-fallback.test.mjs", "FAIL — triage todo-11b"],
|
||||
["tests/user-blocks.test.mjs", "HANG — async leak; needs a deterministic rewrite. triage todo-11b"],
|
||||
["tests/nwc-client.test.mjs", "FAIL — mocks nostr-tools but is shadowed by the frozen canonical toolkit the bootstrap installs (real @noble rejects the fake keys). The underlying production bug (parseNwcUri passed a hex secret to getPublicKey, which needs bytes — NWC connection broken) is FIXED and guarded by tests/nwc-parse-uri.test.mjs; this file needs a mock-injection rework. triage todo-11b (NWC / item #3)"],
|
||||
["tests/nostr-publish-rejection.test.mjs", "FAIL — triage todo-11b"],
|
||||
["tests/nostr-publish-rejection.test.mjs", "FAIL — multi-precondition setup. Diagnosed 2026-06-25: (1) testPublishVideoNoteDefaultsToLiveModeInDev needs dev mode — set globalThis.__BITVID_DEV_MODE_OVERRIDE__=true BEFORE the first (dynamic) config-importing import (~line 50); (2) the publishNip71Video sub-test then fails (publishVideo's NIP-71 invocation path) — needs FEATURE_PUBLISH_NIP71/condition triage; possibly more after. triage todo-11b"],
|
||||
]);
|
||||
|
||||
const rootDir = path.dirname(fileURLToPath(new URL("../package.json", import.meta.url)));
|
||||
|
||||
@@ -178,8 +178,10 @@ async function testUnsupportedRelaySkipsWarningsAndFallsBack() {
|
||||
|
||||
assert.equal(listCalls, 1, "fallback should query list once when COUNT fails");
|
||||
assert.equal(result?.fallback, true, "unsupported relay should trigger fallback");
|
||||
// Unsupported-relay tracking moved from NostrClient to its ConnectionManager
|
||||
// (the client only re-exposes pool/relays/etc.); assert on the manager.
|
||||
assert.ok(
|
||||
client.countUnsupportedRelays.has(unsupportedRelay),
|
||||
client.connectionManager.countUnsupportedRelays.has(unsupportedRelay),
|
||||
"unsupported relay should be remembered for future requests"
|
||||
);
|
||||
assert.equal(
|
||||
|
||||
@@ -746,8 +746,10 @@ test below was failing on `main` unnoticed).
|
||||
Fixed + guarded by the real-tools `tests/nwc-parse-uri.test.mjs`. The mock-based
|
||||
`nwc-client.test.mjs` STAYS quarantined — its nostr-tools mock is shadowed by the
|
||||
frozen canonical toolkit the bootstrap installs; needs a mock-injection rework.
|
||||
- `nostr-count-fallback` — `TypeError: Cannot read 'has' of undefined` — likely
|
||||
a stale harness mock missing a field.
|
||||
- `nostr-count-fallback` — ✅ DONE + UN-QUARANTINED 2026-06-25: STALE TEST after a
|
||||
refactor. `countUnsupportedRelays` moved from `NostrClient` to its
|
||||
`ConnectionManager`; the test read it off the client (undefined.has). Repointed the
|
||||
assertion at `client.connectionManager.countUnsupportedRelays`. No behavior change.
|
||||
- `admin-list-store` — ✅ DONE + UN-QUARANTINED 2026-06-25: STALE HARNESS (no
|
||||
production change, no assertion weakened). Community curator lists are fetched via
|
||||
the BATCHED SubscriptionManager (cold-start relay-storm fix) which the harness
|
||||
@@ -755,8 +757,15 @@ test below was failing on `main` unnoticed).
|
||||
parseCommunityBlacklistReferences decoded them twice; and createListEvent omitted
|
||||
the `d` tag that selectNewestEventsForReferences matches on. Fixed all three to be
|
||||
faithful to production. See TEST_INTEGRITY.md.
|
||||
- `nostr-publish-rejection` — rejection-path assertion.
|
||||
- `user-blocks` — HANGS (async leak); needs a deterministic rewrite.
|
||||
- `nostr-publish-rejection` — STILL QUARANTINED. Partially diagnosed 2026-06-25:
|
||||
multi-precondition setup. (1) `testPublishVideoNoteDefaultsToLiveModeInDev` needs
|
||||
dev mode — set `globalThis.__BITVID_DEV_MODE_OVERRIDE__=true` BEFORE the first
|
||||
(dynamic) config-importing import (~line 50). (2) The `publishNip71Video` sub-test
|
||||
then fails — `publishVideo`'s NIP-71 invocation path needs FEATURE_PUBLISH_NIP71 /
|
||||
condition triage; possibly more after. Quarantine note carries the steps.
|
||||
- `nostr-publish-rejection`, `nwc-client`, `user-blocks` remain quarantined
|
||||
(see QUARANTINE map in run-unit-tests.mjs for the precise reason on each).
|
||||
- `user-blocks` — STILL QUARANTINED: HANGS (async leak); needs a deterministic rewrite.
|
||||
|
||||
### 12. Promotion: `unstable → beta`
|
||||
- [ ] After this batch soaks and the high-priority items land, promote `unstable → beta`
|
||||
|
||||
Reference in new issue
Block a user