coder-xieshijie/dev-skills / skills/repo-readiness/assets/verify-skill
verify-<app>
FlaggedStarts isolated <app> instances, drives them through <entry points> and reports one result per sub-feature and entry with evidence. Use when verifying a change, reproducing a bug, or running, writing or checking feature maps and their scenario scripts.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 6.7 KB |
| features/README.md | markdown | 1.4 KB |
| references/maps.md | markdown | 11.4 KB |
| scripts/config.mjs | script | 5.2 KB |
| scripts/contract.mjs | script | 16.6 KB |
| scripts/map-check.mjs | script | 22.2 KB |
| scripts/primitives.mjs | script | 7.2 KB |
| scripts/runner.mjs | script | 24.0 KB |
| scripts/test/contract-check.test.mjs | script | 3.7 KB |
| scripts/test/contract.test.mjs | script | 1.4 KB |
| scripts/test/fixture/notes-entry.mjs | script | 3.5 KB |
| scripts/test/fixture/proc-app.mjs | script | 1.3 KB |
| scripts/test/fixture/proc-entry.mjs | script | 5.5 KB |
| scripts/test/fixture/web-entry.mjs | script | 535 B |
| scripts/test/helpers.mjs | script | 5.0 KB |
| scripts/test/map-check.test.mjs | script | 9.5 KB |
| scripts/test/primitives.test.mjs | script | 4.1 KB |
| scripts/test/runner.test.mjs | script | 17.3 KB |
| scripts/verify.mjs | script | 9.7 KB |
| verify.config.json | config | 1016 B |
scripts/test/primitives.test.mjs
View on GitHubimport assert from 'node:assert/strict';
import test from 'node:test';
import {
EvidenceError,
WindowError,
after,
holdOutcome,
observationWindow,
pick,
strictBody,
strictReader,
waitOutcome,
waitersFor,
} from '../primitives.mjs';
test('strictBody: a non-2xx status or a missing body is unreadable, never empty', () => {
assert.deepEqual(strictBody({ status: 200, body: { notes: [] } }, 'list'), { notes: [] });
assert.throws(() => strictBody({ status: 404, body: { notes: [] } }, 'list'), EvidenceError);
assert.throws(() => strictBody({ status: 0, error: 'ECONNREFUSED' }, 'list'), EvidenceError);
assert.throws(() => strictBody({ status: 204 }, 'list'), EvidenceError);
});
test('waitOutcome: a terminal value that is not wanted ends the wait as not ok', () => {
const wanted = (v) => v === 'done';
const terminal = (v) => v === 'failed';
assert.equal(waitOutcome(['running', 'done'], { wanted, terminal }).ok, true);
// Counterexample: "failed" first, "done" later must not pass.
assert.equal(waitOutcome(['running', 'failed', 'done'], { wanted, terminal }).ok, false);
assert.equal(waitOutcome(['running'], { wanted, terminal }).why, 'timed out');
});
test('holdOutcome: one bad value fails the hold; nothing observed is not a pass', () => {
const wanted = (v) => v === 0;
assert.equal(holdOutcome([0, 0, 0], { wanted }).ok, true);
assert.equal(holdOutcome([0, 1, 0], { wanted }).ok, false);
assert.equal(holdOutcome([], { wanted }).ok, false);
});
test('after: an item without a readable time is unreadable, not filtered out', () => {
const items = [{ at: '2026-10-10T00:00:01Z' }, { at: '2026-10-10T00:00:03Z' }];
assert.equal(after(items, '2026-10-10T00:00:02Z').length, 1);
assert.throws(() => after([{ at: 'soon' }], '2026-10-10T00:00:02Z'), EvidenceError);
});
test('pick reads dotted paths', () => {
assert.equal(pick({ a: { b: { c: 3 } } }, 'a.b.c'), 3);
assert.equal(pick({ a: null }, 'a.b'), undefined);
});
test('strictReader refuses a side-effect read inside a window and allows it outside', async () => {
const window = observationWindow();
const read = strictReader({ window, sideEffect: (what) => (what === 'queue' ? 'clears the pause' : undefined) });
assert.equal(await read('queue', async () => 1), 1);
window.open();
await assert.rejects(read('queue', async () => 1), WindowError);
assert.equal(await read('status', async () => 2), 2);
window.close();
});
test('strictReader turns a thrown read into unreadable evidence', async () => {
const read = strictReader({ window: observationWindow() });
await assert.rejects(read('list', async () => { throw new Error('socket hang up'); }), EvidenceError);
});
test('until stops at the first wanted value; hold fails as soon as the value leaves', async () => {
let clock = 0;
const waiters = waitersFor({ sleep: async (ms) => { clock += ms; }, now: () => clock, window: observationWindow() });
const values = ['a', 'b', 'c'];
let i = 0;
const reached = await waiters.until(async () => values[i++], 'b', { timeout: 10, interval: 1 });
assert.deepEqual(reached, { ok: true, value: 'b' });
let n = 0;
const held = await waiters.hold(async () => (n++ < 2 ? 0 : 1), 0, 10, { interval: 1 });
assert.equal(held.ok, false);
});
test('a window cannot open while a side-effect read is still in flight', async () => {
const window = observationWindow();
const read = strictReader({ window, sideEffect: (what) => (what === 'queue' ? 'clears the pause' : undefined) });
let finish;
const pending = read('queue', () => new Promise((resolve) => (finish = resolve)));
// Counterexample: the read began before the wait, so the wait must not observe the state it changes.
const waiters = waitersFor({ sleep: async () => {}, window });
await assert.rejects(waiters.hold(async () => 0, 0, 1), WindowError);
finish(1);
assert.equal(await pending, 1);
// Once it has finished, the window opens; a read without a side effect never blocks it.
const slow = read('status', () => new Promise((resolve) => setImmediate(() => resolve(2))));
assert.equal((await waiters.until(async () => 'x', 'x', { timeout: 1 })).ok, true);
assert.equal(await slow, 2);
});
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |