Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
2272364
docs(ci): add manual/weekly DB integration workflow; README milestone…
flyingrobots Oct 7, 2025
0333221
docs(README): tidy wording to satisfy spellcheck
flyingrobots Oct 7, 2025
7c72540
docs(README): clean roadmap progress + milestone focus (no script noise)
flyingrobots Oct 7, 2025
0b37ae7
ci(db-tests): run lint before DB-gated tests to block regressions
flyingrobots Oct 7, 2025
0880d26
Merge pull request #148 from flyingrobots/docs/readme-milestones
flyingrobots Oct 7, 2025
e53f99a
docs(AGENTS): debrief for 2025-10-07 (M2 closed, README roadmap, DB t…
flyingrobots Oct 7, 2025
5463a48
Update Formal-Design-Spec.md
flyingrobots Oct 8, 2025
6c5059b
chore(merge): merge origin/main into docs/readme-milestones
flyingrobots Oct 8, 2025
13c502f
feat(verify): M3 verification verdicts — DB schema/RLS/RPCs, server r…
flyingrobots Oct 8, 2025
622e384
chore(spell): add terms for verification tests (upserts, idempotently…
flyingrobots Oct 8, 2025
5d8dfe2
docs(agents): fix frontmatter and append JSONL debrief
flyingrobots Oct 8, 2025
65b987d
chore(spell): add relrowsecurity term for debrief JSON
flyingrobots Oct 8, 2025
945f026
ci(db-tests): run on pull_request with path filters for DB/RPC/client…
flyingrobots Oct 8, 2025
786f68a
ci(db-tests): fix postgres service options (remove backslashes; use e…
flyingrobots Oct 8, 2025
d03d6a7
ci(db-tests): install web/ dependencies before lint to satisfy import…
flyingrobots Oct 8, 2025
fe8b72e
fix(web): remove redundant eslint-disable; use globalThis.setTimeout …
flyingrobots Oct 8, 2025
05c1039
chore(spell): add 'regs' term used in tests
flyingrobots Oct 8, 2025
b0355f9
feat(db): add client_nonce to verification_verdicts; update verify_su…
flyingrobots Oct 8, 2025
1a7d6ee
fix(db): create verification_verdicts_view before verify_summary to s…
flyingrobots Oct 8, 2025
6e251bd
chore(eslint): allow resolver to find web/node_modules for next/react…
flyingrobots Oct 8, 2025
deb6c20
chore(eslint): suppress import/no-unresolved for web Next/React deps …
flyingrobots Oct 8, 2025
6c80462
docs(agents): add Neo4j shared memory usage guide (when/what/how) and…
flyingrobots Oct 8, 2025
5ad891b
chore(spell): add 'collab' term used in docs
flyingrobots Oct 8, 2025
0c186f9
chore(eslint): disable import/no-unresolved under web/** to stabilize…
flyingrobots Oct 8, 2025
af013fe
ci(web): add path-scoped Next.js build; disable eslint during build; …
flyingrobots Oct 8, 2025
494bd94
test(server): attach DB pool in journal.byidx test to use DB path and…
Oct 8, 2025
f395336
ci(db-tests): run DB-gated suites sequentially and limit lint to non-…
Oct 8, 2025
f8bc462
ci(db-tests): run DB-gated suites sequentially and limit lint to non-…
Oct 8, 2025
ec1a510
ci(db-tests): include verify.submit and verify.summary DB tests in se…
Oct 8, 2025
6b0ed10
ci(db-tests): lint only server/bin/scripts to avoid web resolver nois…
Oct 8, 2025
ee7b92b
test(server): attach DB pool in journal.byidx test; fix ECONNREFUSED …
Oct 8, 2025
f0dbd9a
Merge pull request #150 from flyingrobots/feat/m3-verification
flyingrobots Oct 8, 2025
2779749
style(test): satisfy import/newline-after-import in rpc.verify.summar…
Oct 8, 2025
e889229
Merge remote-tracking branch 'origin/main' into ci/web-build-scoped
flyingrobots Oct 8, 2025
c78f947
fix(repo): apply review feedback for PR #151
flyingrobots Oct 8, 2025
ccd953a
feat(web): implement verification summary visualization with confiden…
flyingrobots Dec 22, 2025
54d1c62
feat(m3): complete frontend verification and moderation workflows
flyingrobots Dec 22, 2025
d46953b
chore(m1): enforce RLS via views and align room_create docs
flyingrobots Dec 23, 2025
e805094
feat(m2): complete audit trail and SSH auth challenge/verify
flyingrobots Dec 23, 2025
9a9f44c
feat(m3): complete frontend verification and moderation workflows
flyingrobots Dec 23, 2025
cc74087
feat(m4): implement final voting, RLS, and views
flyingrobots Dec 23, 2025
9127a89
fix(auth): enforce participant-room binding during SSH verify
flyingrobots Dec 23, 2025
be7edc1
feat(m4): complete attribution control and voting UI
flyingrobots Dec 23, 2025
b9c3b4b
feat(m4): add integration tests for attribution and lifecycle
flyingrobots Dec 23, 2025
1f76469
feat(m4): isolate tests with unique UUIDs
flyingrobots Dec 23, 2025
5ae77a5
feat(m5): implement scoring rubric and Elo reputation system
flyingrobots Dec 23, 2025
c4e887a
feat(m5): complete scoring rubric, Elo reputation, and tests
flyingrobots Dec 23, 2025
7e6bb13
feat(m5): complete scoring and reputation system
flyingrobots Dec 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .githooks/commit-msg
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#!/usr/bin/env bash
msg_file="$1"
pattern='^(revert: )?(feat|fix|docs|style|refactor|perf|test|build|ci|chore|ops|sec)(\(.+\))?: .+'
merge_pattern='^Merge (branch|pull request|remote-tracking branch)'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Incomplete merge pattern: tag merges will be incorrectly rejected.

The pattern covers branch, pull request, and remote-tracking branch merges, but omits tag merges. Git generates messages like Merge tag 'v1.0.0' which will fail the conventional commits check.

🔎 Fix to include tag merges
-merge_pattern='^Merge (branch|pull request|remote-tracking branch)'
+merge_pattern='^Merge (branch|pull request|remote-tracking branch|tags?)'

Note: tags? handles both "Merge tag" (singular) and "Merge tags" (multiple tags).

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
merge_pattern='^Merge (branch|pull request|remote-tracking branch)'
merge_pattern='^Merge (branch|pull request|remote-tracking branch|tags?)'
🤖 Prompt for AI Agents
.githooks/commit-msg around line 4: the current merge_pattern only matches
branch, pull request, and remote-tracking branch merges and will reject tag
merge messages like "Merge tag 'v1.0.0'"; update the regex to also accept "tag"
or "tags" (e.g., add tags? into the alternation) so merge messages for tags are
allowed by the conventional commit check.


# Allow merge commits (auto-generated messages like "Merge branch ...")
# by checking the message content rather than repository state.
if grep -Eq "$merge_pattern" "$msg_file"; then
exit 0
fi

if ! grep -Eq "$pattern" "$msg_file"; then
echo "✖ Commit message must follow Conventional Commits" >&2
exit 1
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,28 @@ jobs:
run: |
npm ci --prefix web || (echo "web npm ci failed; retrying clean install" && rm -rf web/node_modules web/package-lock.json && npm --prefix web install)

- name: Detect path changes
id: changes
uses: dorny/paths-filter@v3
with:
filters: |
web:
- 'web/**'
- 'public/**'
- 'eslint.config.js'
- 'web/package.json'
- 'web/package-lock.json'

Comment on lines +45 to +56
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find Next.js config files in web/
echo "=== Searching for Next.js config files ==="
fd -e js -e mjs -e ts 'next\.config' web/ 2>/dev/null || echo "No next.config found"

# Find other potential web config files
echo ""
echo "=== Searching for other web config files ==="
fd -e json -e js -e mjs 'tsconfig|jsconfig|postcss|tailwind' web/ 2>/dev/null || echo "No matching files found"

# List root files in web/ directory
echo ""
echo "=== All files in web/ root directory ==="
ls -la web/ | grep -E '^\-' | awk '{print $NF}'

# Check if eslint.config.js exists at repo root
echo ""
echo "=== Checking eslint.config.js location ==="
ls -la eslint.config.js 2>/dev/null || echo "No eslint.config.js at root"

# Find all package.json files in web tree
echo ""
echo "=== All package.json files in web/ ==="
fd 'package.json' web/

Repository: flyingrobots/db8

Length of output: 546


Add missing web configuration files to the path filter.

The filter is critically incomplete. It fails to include several essential web build dependencies:

  • web/next.config.js — changes here bypass the web rebuild entirely
  • web/jsconfig.json — module resolution configuration
  • web/postcss.config.js — CSS processing configuration
  • web/tailwind.config.js — Tailwind CSS compilation configuration

Changes to any of these files will not trigger the web workflow. Add all four to the filter. The eslint.config.js concern remains secondary — verify whether linting config changes warrant a rebuild in your workflow design.

🤖 Prompt for AI Agents
In .github/workflows/ci.yml around lines 45 to 56 the paths-filter for the "web"
group is missing several web configuration files so changes to them don't
trigger the web workflow; add web/next.config.js, web/jsconfig.json,
web/postcss.config.js, and web/tailwind.config.js to the 'web' filter list so
modifications to these config files will cause the web workflow to run, and
verify whether eslint.config.js should remain included based on whether lint
config changes should trigger a rebuild.

- name: Lint
run: npm run lint

- name: Build Web (Next.js)
if: github.event_name == 'push' || steps.changes.outputs.web == 'true'
env:
NODE_ENV: production
NEXT_TELEMETRY_DISABLED: '1'
run: npm --prefix web run build

Comment on lines +60 to +66
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Asymmetric build condition: always build on push, conditional on PRs.

The Build Web step condition github.event_name == 'push' || steps.changes.outputs.web == 'true' means:

  • On push events (to main branch): always builds web, regardless of which files changed.
  • On pull_request events: only builds if the path filter detects web-related changes.

This asymmetry introduces a risk: if a PR that doesn't touch web files is merged to main, the main build will run even though the PR build didn't. This could mask build failures that only manifest in production builds.

Consider either:

  1. Making both events conditional on the path filter: steps.changes.outputs.web == 'true'
  2. Documenting why main builds must always run (e.g., for deployment purposes).
🔎 Proposed fix to make the condition symmetric
       - name: Build Web (Next.js)
-        if: github.event_name == 'push' || steps.changes.outputs.web == 'true'
+        if: steps.changes.outputs.web == 'true'
         env:
           NODE_ENV: production
           NEXT_TELEMETRY_DISABLED: '1'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Build Web (Next.js)
if: github.event_name == 'push' || steps.changes.outputs.web == 'true'
env:
NODE_ENV: production
NEXT_TELEMETRY_DISABLED: '1'
run: npm --prefix web run build
- name: Build Web (Next.js)
if: steps.changes.outputs.web == 'true'
env:
NODE_ENV: production
NEXT_TELEMETRY_DISABLED: '1'
run: npm --prefix web run build
🤖 Prompt for AI Agents
.github/workflows/ci.yml around lines 60 to 66: the Build Web step condition is
asymmetric (always runs on push but only conditional on PRs); change the if
expression to use the path filter for both events by replacing the current
condition with steps.changes.outputs.web == 'true' so the build only runs when
web files changed, or alternatively add an explicit comment explaining why
builds must run on push (e.g., required for deployment) if you intend to keep
the current behavior.

- name: DB setup
env:
PGURL: postgresql://postgres:test@localhost:54329/db8_test
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/db-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: db-tests
on:
# Manual trigger remains available
workflow_dispatch:
# Run weekly for drift detection
schedule:
- cron: '0 6 * * 1' # weekly Monday 06:00 UTC
# Run automatically on PRs when DB‑related files change
pull_request:
paths:
- 'db/**'
- 'server/rpc.js'
- 'server/journal.js'
- 'server/watcher.js'
- 'server/schemas.js'
- 'bin/db8.js'
- 'server/test/**'
types: [opened, synchronize, reopened]
jobs:
db-integration:
# Avoid duplicate concurrent runs for the same PR/branch
concurrency:
group: db-tests-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
ports: ['5432:5432']
env:
POSTGRES_PASSWORD: test
POSTGRES_USER: postgres
POSTGRES_DB: postgres
# NOTE: Do not include shell line-continuation backslashes here; the
# options string is passed directly to `docker create`.
options: >-
--health-cmd="pg_isready -U postgres"
--health-interval=10s
--health-timeout=5s
--health-retries=5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm ci
- name: Install web dependencies
run: npm ci --prefix web
- name: Create test database
env:
PGPASSWORD: test
run: |
until pg_isready -h localhost -p 5432 -U postgres; do sleep 2; done
psql -h localhost -U postgres -c 'CREATE DATABASE db8_test;'
- name: Prepare schema/RPC/RLS
env:
DATABASE_URL: postgresql://postgres:test@localhost:5432/db8_test
DB8_TEST_OUTPUT: quiet
run: node scripts/prepare-db.js
Comment on lines +49 to +59
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Hardcoded test credentials are acceptable for ephemeral CI containers.

The Checkov warning (CKV_SECRET_4) on lines 57-58 is a false positive. These credentials exist solely for a throwaway Postgres container that lives only during the CI run. The DATABASE_URL is correctly scoped to the job and not persisted.

However, if you want to silence the static analysis noise and follow the principle of least surprise, you could reference POSTGRES_PASSWORD from the service definition:

🔎 Optional: DRY the password reference
       - name: Prepare schema/RPC/RLS
         env:
-          DATABASE_URL: postgresql://postgres:test@localhost:5432/db8_test
+          DATABASE_URL: postgresql://postgres:${{ env.PGPASSWORD }}@localhost:5432/db8_test
           DB8_TEST_OUTPUT: quiet
         run: node scripts/prepare-db.js

Note: This would require setting PGPASSWORD as a job-level env var. The current approach is fine.

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 Checkov (3.2.334)

[medium] 57-58: Basic Auth Credentials

(CKV_SECRET_4)

🤖 Prompt for AI Agents
In .github/workflows/db-tests.yml around lines 49 to 59 the CI job hardcodes the
test database password and DATABASE_URL which triggers the Checkov CKV_SECRET_4
false positive; replace the literal password by referencing the service-level
POSTGRES_PASSWORD env var (or set PGPASSWORD as a job-level env var) and use
that variable in the DATABASE_URL so the secret is not inline in the job; ensure
the service definition declares POSTGRES_PASSWORD and that the job env uses it
(and update the psql invocation to rely on PGPASSWORD) so credentials remain
ephemeral but are no longer hardcoded in the workflow.

- name: Run lint (server/db only)
run: |
# Limit lint to non-web paths for this DB-focused job to avoid resolver noise
npx eslint server bin scripts eslint.config.js vitest.config.js
- name: Run DB-gated tests (glob)
env:
DB8_TEST_PG: '1'
DB8_TEST_DATABASE_URL: postgresql://postgres:test@localhost:5432/db8_test
run: |
npx vitest run "server/test/**/*.db.*.js" server/test/journal.byidx.test.js --reporter verbose
Comment on lines +64 to +69
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Explore server/test directory structure and file naming
echo "=== Directory structure of server/test ==="
find server/test -type f -name "*.js" 2>/dev/null | sort | head -30

echo ""
echo "=== Files matching *.db.*.js pattern ==="
find server/test -type f -name "*.db.*.js" 2>/dev/null | sort

echo ""
echo "=== Checking for journal.byidx.test.js ==="
find server/test -type f -name "*journal.byidx*" 2>/dev/null

echo ""
echo "=== All .test.js files in server/test ==="
find server/test -type f -name "*.test.js" 2>/dev/null | sort | head -30

Repository: flyingrobots/db8

Length of output: 2657


Fix the naming convention violation or justify the explicit inclusion.

The glob "server/test/**/*.db.*.js" correctly matches 6 database test files (rpc.db.integration.test.js, rpc.db.postgres.test.js, rpc.db.verify.test.js, sse.db.events.test.js, sse.db.journal.test.js, watcher.db.flip.test.js). However, journal.byidx.test.js is manually appended outside the glob—it doesn't follow the .db. naming convention. If this is a database test, rename it to follow the pattern (e.g., journal.byidx.db.test.js). If it isn't, remove it from this DB-specific test run.

🤖 Prompt for AI Agents
.github/workflows/db-tests.yml around lines 64 to 69: the workflow runs a glob
matching DB tests ("server/test/**/*.db.*.js") but then explicitly appends
server/test/journal.byidx.test.js which does not follow the .db. naming
convention; either rename the test file to follow the pattern (e.g.,
server/test/journal.byidx.db.test.js) and update any imports/refs so it is
covered by the glob, or remove the explicit filename from this DB-specific step
if that test is not a database test; ensure any other workflow steps or scripts
referencing the old filename are updated accordingly.

1 change: 1 addition & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ web/.next/

# generated assets or external
public/
docs/debates/
115 changes: 114 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
lastUpdated: 2025-10-06
lastUpdated: 2025-10-08
---

# AGENTS.md
Expand Down Expand Up @@ -147,6 +147,66 @@ Working style
the worker.
- Deterministic behavior: prefer stable hashing, canonical JSON, advisory locks.

Neo4j Shared Memory (Context & Notes)

When to use (simple rules)

- At session start: query memory for James’s profile/interests and active topics.
- On topic switch: append a short “insight” with what changed and why.
- After major events: PRs opened/merged, CI status changes, architectural decisions.
- Before answering complex or longitudinal questions: skim recent links around “James” to maintain continuity.

How to use (quick commands)

- Connection (local dev):
- Host: <http://localhost:7474>
- User/Pass: neo4j / password123 (override via env if available)
- DB: neo4j (default)

- Read (curl examples):

```bash
# Interests
curl -s -u neo4j:password123 -H 'Content-Type: application/json' \
-X POST http://localhost:7474/db/neo4j/query/v2 \
-d '{"statement":"MATCH (j:User {name: \"James\"})-[:INTERESTED_IN]->(i) RETURN i.name,i.category"}'

# Active topics
curl -s -u neo4j:password123 -H 'Content-Type: application/json' \
-X POST http://localhost:7474/db/neo4j/query/v2 \
-d '{"statement":"MATCH (t:Topic {status: \"active\"}) RETURN t.name,t.description"}'

# Local context around James
curl -s -u neo4j:password123 -H 'Content-Type: application/json' \
-X POST http://localhost:7474/db/neo4j/query/v2 \
-d '{"statement":"MATCH (n)-[r]-(m) WHERE n.name=\"James\" OR m.name=\"James\" RETURN n.name,type(r),m.name LIMIT 10"}'
```

- Write (append an insight):

```bash
INSIGHT='Short insight about the session (what changed / decisions / PR links)'
curl -s -u neo4j:password123 -H 'Content-Type: application/json' \
-X POST http://localhost:7474/db/neo4j/query/v2 \
-d "{\"statement\": \"MATCH (j:User {name: \\\"James\\\"}) CREATE (x:Insight {content: \\\"${INSIGHT//\"/\\\\\"}\\\", added_by: \\\"Codex\\\", confidence: 0.9, timestamp: datetime()}) CREATE (j)-[:HAS_INSIGHT]->(x) RETURN x\"}"
```

- Tip: JSONL flow (bulk): write one JSON object per line to /tmp and POST; or prefer the agent-collab CLI in `/Users/james/git/agent-collab/` for cleaner UX.

Private session notes (~/Codex)

- Also keep a parallel Markdown note per session/day:
- Path: `~/Codex/YYYY-MM-DD-<topic>.md`
- Frontmatter: `lastUpdated: YYYY-MM-DD` (ISO date only)
- Include: summary, links (Issues/PRs), CI status, Mermaid diagrams for flows, and “Next”.

Style & guardrails

- Keep insights short and factual; no sensitive tokens.
- Prefer links to Issues/PRs/Commits for traceability.
- Use Mermaid/SVG in ~/Codex notes for visual learners.
- This memory is additive: never delete; append new context as it evolves.

Guardrails (enforced by repo config)

- Node 20+. See .nvmrc.
Expand Down Expand Up @@ -960,3 +1020,56 @@ On each change: bump docs `lastUpdated`, update Agent Log, and sync the Project
- [M6: Research Tools](https://github.com/flyingrobots/db8/milestone/7)
- [M7: Hardening & Ops](https://github.com/flyingrobots/db8/milestone/8)
- [M2: Provenance](https://github.com/flyingrobots/db8/milestone/16)

---

### Event — 2025-10-07 | M2 closed, README roadmap, DB tests workflow

#### Summary

- Closed both M2 milestones and verified acceptance with green tests. Added CLI journal verify tests, corrected error labels, cleaned temp ignores, and hardened SSH parsing. Rewrote README with a weighted milestone progress bar and added milestone focus descriptions. Introduced a manual/weekly GitHub Actions workflow to run DB‑gated integration suites; ensured lint runs before tests.

#### References

- Issues: closed/moved — #67, #68, #70, #30, #117, #121, #9, #10 (closed); #11, #12, #29, #7 (→ M3); #31, #15 (→ M6); #32, #13, #14 (→ M7)
- PRs: #144 (CLI SSH verify + docs), #145/#146/#142 (deps alignment), #148 (db‑tests workflow + README milestone focus)
- Files: `server/test/cli.journal.verify.test.js`, `docs/Provenance.md`, `.gitignore`, `server/rpc.js`, `.github/workflows/db-tests.yml`, `README.md`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Trivial: Use "GitHub" with capital H.

Static analysis correctly flags this. Fix it.

🔎 One-character fix
-  - Files: `server/test/cli.journal.verify.test.js`, `docs/Provenance.md`, `.gitignore`, `server/rpc.js`, `.github/workflows/db-tests.yml`, `README.md`
+  - Files: `server/test/cli.journal.verify.test.js`, `docs/Provenance.md`, `.gitignore`, `server/rpc.js`, `.github/workflows/db-tests.yml`, `README.md`

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~1036-~1036: The official name of this software platform is spelled with a capital “H”.
Context: ...nce.md, .gitignore, server/rpc.js, .github/workflows/db-tests.yml, README.md` #...

(GITHUB)

🤖 Prompt for AI Agents
In AGENTS.md around line 1036 the word "GitHub" is incorrectly cased; update the
text to use the correct capitalization "GitHub" (capital G and H) wherever that
instance appears on this line so the repository uses the proper trademark
casing.


#### Key Decisions

- M2 is done; provenance/journals shipped with tests and docs.
- Keep DB‑gated suites behind a dedicated workflow (manual + weekly); lint must run first in that job.
- README carries a simple, weighted progress bar plus a concise “Milestone Focus” section.
- No force‑push; resolve forward with additive commits.

#### Action Items

- Monitor the new db‑tests workflow; stabilize if any flakes appear.
- Kick off M3 (Verification): open issues, define schema/RPCs, add tests and endpoints (see next plan).
- Keep board hygiene: set new M3 issues to Status=Todo/Workflow=Todo and link them to the project.

#### Notes

- Added `/.tmp*` to `.gitignore` and removed tracked temp files.
- Corrected docs to use `unsupported_signature_kind`; pinned JCS in SSH tests.

#### Next Moves (Plan — M3 Verification)

- Schema/RPC (DB)
- `verification_verdicts` (id, round_id, submission_id/claim_id, verdict enum, rationale, reporter_id, created_at) + indexes + RLS; secure read views.
- RPCs: `verify_submit(...)`, `verify_aggregate(...)` with idempotency + bounds.
- pgTAP invariants for tables/uniques/RLS and RPC contracts.
- Server/CLI/UI
- Server endpoints: `POST /rpc/verify.submit`, `GET /verify/summary`.
- CLI: `db8 verify submit` and `db8 verify summary`.
- Web: minimal verification view on the room page.
- Tests/CI
- Unit tests for endpoints/CLI; DB‑gated integration for RPCs end‑to‑end; keep lint first in all jobs.
- Docs/Board
- `docs/Verification.md` guide; README link; track under milestone “M3: Verification”.
{"date":"2025-10-08","time":"19:14","summary":"Shipped M3 Verification: added verification verdicts across DB/Server/CLI/Web, made pgTAP + Docker DB suite green, and opened a draft PR.","topics":[{"topic":"Verification DB & RLS","what":"Added verification_verdicts table, RLS policies, and views","why":"M3 requires recording per-claim/per-submission verdicts","context":"Existing M1/M2 schema with submissions/votes and RLS groundwork","issue":"Design idempotency and enforce role/membership for reporters","resolution":"Unique on (round,reporter,submission,claim); verify_submit enforces judge/host and round phase","future_work":"Consider richer claim structure and cross-round carryover","time_percent":25},{"topic":"Server & CLI endpoints","what":"POST /rpc/verify.submit, GET /verify/summary; CLI verify submit/summary","why":"Expose verdict write/read paths to clients","context":"Express RPCs with Zod validation and in-memory fallback patterns","issue":"Consistent validation + idempotency and friendly CLI UX","resolution":"Zod schema + RPC upsert; CLI flags validated; helpful errors","future_work":"Add --json rich summary and grouping in CLI","time_percent":20},{"topic":"pgTAP + Docker DB suite","what":"Installed pgTAP, added invariants, fixed tests for portability","why":"Gate DB invariants and RPC contracts in CI and locally","context":"Manual/weekly db-tests workflow; local docker compose on :54329","issue":"RLS tests under superuser; pgtap version differences; missing seeds","resolution":"Used reader role, relrowsecurity checks, seeded rows; corrected plans; all green","future_work":"Promote more DB-gated tests and stabilize timings","time_percent":30},{"topic":"Flags view pre-publish leakage","what":"Adjusted submissions_with_flags_view to restrict to published","why":"Ensure zero flags appear before publish even with base-table access","context":"submission_flags RLS + aggregated view consumed by server/web","issue":"Pre-publish aggregate showed 1 due to join behavior","resolution":"Join flags through submissions/rounds and filter rr.phase='published'","future_work":"Revisit if we add moderator preview paths","time_percent":10},{"topic":"Repo hygiene & PR","what":"Merged origin/main, created branch, opened Draft PR, created Issue","why":"Follow AGENTS.md discipline (issues, milestones, project, draft PRs)","context":"Project 'db8 Roadmap', milestone 'M3: Verification'","issue":"Ensure board fields, labels, and milestone are set","resolution":"Issue #149, Draft PR #150 with labels/milestone; project updated","future_work":"Kick off db-tests workflow and request reviews","time_percent":15}],"key_decisions":["Use judge/host roles for verify_submit and require published/final rounds","Keep verdict visibility reporter-only until publish; aggregate via view","Adopt JSONL debrief entries appended to AGENTS.md","Open Draft PR and track via Project/Milestone before merge"],"action_items":[{"task":"Run GitHub 'db-tests' workflow and attach results to PR #150","owner":"james"},{"task":"Request reviewers and iterate on feedback for PR #150","owner":"james"},{"task":"Enhance UI with per-claim verdict badges in transcript","owner":"james"}]}


---

{"date":"2025-10-08","time":"21:35","summary":"Merged PR #151 feedback to tighten verification UPSERT keys, clean ESLint resolver config, harden room poller abort handling, and refine commit hook guardrails.","topics":[{"topic":"Verification UPSERT","what":"Removed client_nonce from verification_verdicts conflict target","why":"Deduplicate on substantive identifiers and keep nonce as metadata","resolution":"Conflict now keys on (round,reporter,submission,coalesce(claim,'')) while updating verdict/rationale","time_percent":25},{"topic":"ESLint Resolver","what":"Dropped import/core-modules bypass and fixed resolver paths","why":"Ensure import/no-unresolved runs against actual node_modules","resolution":"Expanded node resolver moduleDirectory and reran lint successfully","time_percent":20},{"topic":"Web Verify Poller","what":"Abortable fetch loop prevents setState after unmount","why":"Avoid memory leaks and React warnings during navigation","resolution":"Added AbortController per-iteration and guarded error handling","time_percent":30},{"topic":"Repo Guardrails","what":"Hardened commit-msg hook and in-memory verify summary parsing","why":"Enforce Conventional Commits precisely and skip malformed cache keys","resolution":"Hook now matches merge message patterns; mem aggregation ignores short keys","time_percent":25}],"key_decisions":["Use message pattern to allow auto merge commits instead of MERGE_HEAD bypass","Abort summary polling fetches on cleanup to prevent stale updates"],"action_items":[{"task":"Monitor room verify summary polling after deployment","owner":"james"}]}
Loading
Loading