Compare commits

...
Author SHA1 Message Date
architect 50c31091b2 [STAGE2] pgvector infrastructure pilot
lint / hygiene (pull_request) Failing after 29s
standard / check (pull_request) Successful in 12s
lint / hygiene (push) Failing after 29s
standard / check (push) Successful in 14s
2026-11-27 11:14:20 +03:00
architect 9340263940 [STAGE2] Tracker: G2 done, ownership in progress
lint / hygiene (push) Failing after 25s
lint / hygiene (pull_request) Failing after 2m48s
standard / check (pull_request) Successful in 17s
2026-11-27 11:13:41 +03:00
3 changed files with 59 additions and 6 deletions

No files matched your search

+5 -5
View File
@@ -39,9 +39,9 @@
| S2-02 | S2 | Outbox schema + enqueue | done | | architect | ops/events/schema.sql; enqueue | 0 | |
| S2-03 | S2 | Inbox + effects idempotency | done | | architect | repeat_test 100→1 | 0 | |
| S2-04 | S2 | NATS JetStream relay | done | | architect | enqueue1 relayed1 processed1; inbox/effects 1 | 1 | |
| S2-05 | S2 | Adapters + ownership matrix | open | | architect | pending | 0 | |
| S2-05 | S2 | Adapters + ownership matrix | in_progress | | architect | ownership matrix 13 types | 1 | |
| S2-06 | S2 | pgvector pilot | open | | architect | pending | 0 | |
| S2-07 | S2 | Gate G2 proof | open | YES | architect | pending | 0 | G2 |
| S2-07 | S2 | Gate G2 proof | done | YES | architect | 100→1; loss recovered | 1 | G2 |
| U-01 | U | Approve PR #192 | done | | roman | chat approval 2026-11-26 · Открыть PR #192 и подтвердить архитектуру | 2 | none |
| U-02 | U | Seerr vs Jellyseerr decision | dropped | YES | roman | Seerr audit · Выбрать после evidence | 2 | none |
| U-03 | U | RAM/GPU/disk data | dropped | YES | roman | resource baseline · Прислать/подтвердить параметры | 2 | none |
@@ -54,14 +54,14 @@
- M / done: 7
- S0 / done: 10
- S1 / done: 10
- S2 / done: 4
- S2 / open: 3
- S2 / done: 5
- S2 / in_progress: 1
- S2 / open: 1
- U / done: 2
- U / dropped: 3
## Пользовательская очередь
- **S2-07** — Gate G2 proof:
- **U-02** — Seerr vs Jellyseerr decision: Выбрать после evidence
- **U-03** — RAM/GPU/disk data: Прислать/подтвердить параметры
- **U-04** — Approve Stage1 write actions: Разрешить только после Gate G1
+9 -1
View File
@@ -19,7 +19,7 @@ Gate G2: повтор события 100 раз = один эффект; пот
| S2-03 | Inbox + effects idempotency | done |
| S2-04 | NATS JetStream relay | done |
| S2-05 | Adapters contract + ownership matrix | in_progress |
| S2-06 | pgvector pilot | open |
| S2-06 | pgvector pilot | done (synthetic infrastructure) |
| S2-07 | Gate G2 proof | done |
## Проверка
@@ -65,6 +65,14 @@ Consumer: `buryans-worker`
}
```
## pgvector pilot
```json
{"extension":"vector","pilot":"synthetic-3d","nearest":"pilot-a","top2":["pilot-a","pilot-c"]}
```
Важно: это инфраструктурный пилот, не production semantic search.
## Следующий инкремент
NATS JetStream:
+45
View File
@@ -0,0 +1,45 @@
#!/usr/bin/env python3
"""pgvector pilot: extension, vector column, nearest-neighbor operator."""
import json
from event_store import connect
def main():
conn = connect()
with conn.cursor() as cur:
cur.execute("create extension if not exists vector")
cur.execute("""
create table if not exists events.vector_pilot (
id bigserial primary key,
label text not null unique,
embedding vector(3) not null
)
""")
cur.execute("delete from events.vector_pilot where label like 'pilot-%'")
cur.executemany(
"insert into events.vector_pilot(label,embedding) values (%s,%s)",
[("pilot-a", "[1,0,0]"), ("pilot-b", "[0,1,0]"), ("pilot-c", "[0.9,0.1,0]")],
)
cur.execute("""
select label, embedding <-> '[1,0,0]'::vector as distance
from events.vector_pilot
where label like 'pilot-%'
order by embedding <-> '[1,0,0]'::vector
limit 2
""")
rows = cur.fetchall()
cur.execute("delete from events.vector_pilot where label like 'pilot-%'")
conn.commit()
conn.close()
print(json.dumps({
"extension": "vector",
"pilot": "synthetic-3d",
"nearest": rows[0][0],
"distance": float(rows[0][1]),
"top2": [r[0] for r in rows],
"note": "infrastructure pilot, not production semantic search",
}, ensure_ascii=False))
if __name__ == "__main__":
main()