14 Commits

Author SHA1 Message Date
coreci-nextcraft-po 809ce3bda8 feat(placements): v0.11 P5 learner placement visibility (REQ-11-005) [6/10] — wave 5-2: placement.ts mirrors for the learner status reads (D-110)
CI / node (push) Has been cancelled
CI / python (push) Has been cancelled
2026-10-21 04:41:14 +00:00
CIAgent cb3af9d06a feat(P03): complete placement-reporting phase (REQ-11-003)
CI / node (push) Successful in 39s
Release / release (push) Successful in 2m52s
CI / python (push) Successful in 3m34s
Phase 3 complete: the D-107 overview (distinct-learner counting
toward 1,000), the per-employer placement view, placement.ts wire
pins, the engine-client placements section, the /employer/applications
page + the overview mock-block conversion. Verify four-layers PASS.
Ships as v0.10.3.

---ci---
phase: 3
milestone: v0.11
status: complete
requirements:
  covered: [REQ-11-003]
  partial: []
---/ci---
2026-10-01 13:59:56 +00:00
CIAgent 579fc6b105 merge: milestone/v0.10-b2b-employer-network -> main (v0.10 complete — B2B Employer Network)
Release / release (push) Successful in 2m44s
CI / python (push) Successful in 3m1s
CI / node (push) Successful in 40s
The v0.10 milestone: employers become principals of the marketplace
(REQ-F-019 activated as REQ-10-001..005 per D-085). Employer auth
with scrypt password hashing, hashed session tokens, and login/
register throttles (G-311/G-312/G-315); employer identity as claim/
verify over the v0.6 marketplace entities with advisory evidence
adjudication and admin approval (D-089/D-089/G-316/G-317); the
dashboard converted to real data with honest empty/pending/
processing states (no mock charts); self-serve postings through
the shared D-091 entitlement gate byte-identical with the admin
path (G-318/G-319); self-serve checkout over the v0.9 catalog
through the REAL webhook path with the own-session mock-complete
closing the G-301 class (G-302/G-303/G-304 carried forward); and
the admin network overview — accounts, claim queue, and audit in
one panel (D-094). Final review verdict SHIP: 2 P0s found and
fixed (the /me claim-state leak, the dead billing confirm button),
3 P1s dispositioned; audit PASS — reconstruction clean, discipline
green. Tags v0.9.0..v0.9.6 on the v0.9.x line; the tag lane builds
every release's full asset matrix per D-064.

---ci---
phase: 6
milestone: v0.10
status: complete
requirements:
  covered: [REQ-10-001, REQ-10-002, REQ-10-003, REQ-10-004, REQ-10-005]
  partial: []
---/ci---
2026-10-01 01:05:45 +00:00
CIAgent 0592c9993d merge: milestone/v0.9-payment-engine -> main (v0.9 complete — Payment Engine)
The v0.9 milestone: payment processing and subscription management
(REQ-F-018 activated as REQ-9-001..005 per D-074). The billing module
(ai_service/billing/ — PaymentProvider protocol with deterministic
mock + Stripe-compatible REST over the shared pool, the 7th D-027
store with 7 tables, the HMAC-SHA256 webhook core per D-077), the
seeded catalog + /v1/billing routes, the pricing page's runtime
conversion, posting entitlement enforcement with honest 402 upgrade
CTAs, and the full subscription lifecycle with a queryable audit
trail. Operator-mediated checkout at pilot (D-076); grants exactly-
once per session (G-303); webhook state resolved from local rows only
(G-302); consumption as a single conditional UPDATE (G-304). Tags
v0.8.0..v0.8.6 on the v0.8.x line; the tag lane built every release's
full asset matrix + registry image (D-064).

---ci---
phase: 6
milestone: v0.9
status: complete
requirements:
  covered: [REQ-9-001, REQ-9-002, REQ-9-003, REQ-9-004, REQ-9-005]
  partial: []
---/ci---
2026-09-30 11:03:33 +00:00
CIAgent 1a88ab3199 merge: milestone/v0.8-ship-anywhere -> main (v0.8 complete — Ship Anywhere)
Release / release (push) Successful in 3m45s
CI / python (push) Successful in 1m52s
CI / node (push) Successful in 1m0s
The v0.8 milestone: installable on any Debian-based server via docker
(Gitea registry image, honest sandbox degrade), deb (amd64+arm64,
advisory postinst), and arch-aware binary — with release consistency
enforced by pre-commit hooks + Gitea Actions (3-runner fleet on CT 113,
machine-made releases with the full 8-asset matrix + registry image), the
CLI carrying the full suite (guide, channel-aware doctor), and the admin
runbook (deploy/README.md, evidence-backed recipes).

---ci---
phase: 6
milestone: v0.8
status: complete
requirements:
  covered: [REQ-8-001, REQ-8-002, REQ-8-003, REQ-8-004, REQ-8-005]
  partial: []
---/ci---
2026-09-29 16:04:40 +00:00
CIAgent 99da159866 chore(P04): lint & suppression hygiene — ESLint everywhere, 0 noqa, version single-source (REQ-7-004)
Wave 4-1 ESLint adoption (D-048): flat config at root — eslint 10 +
typescript-eslint (non-type-checked) + react-hooks CORE rules only
(compiler-era rules excluded with rationale: they fire on 6 shipped
components; restructuring shipped UI is out of NFR scope). lint scripts
in all 5 TS workspaces; pnpm lint now exercises 6/6. 20 violations fixed
(12 unused imports/vars, 2 NODE_TEST_CONTEXT renames, 1 type-alias fix).
5 orphaned eslint-disables resolved explicitly: 2 removed (deploy.ts
no-explicit-any orphan; avatar.tsx jsx-a11y — rule not in set, alt present);
3 kept load-bearing with justification comments (exhaustive-deps:
use-sandbox-session, build-surface, defense-session). 1 new suppression
(browser-voice.ts:65 prefer-const — TDZ-load-bearing, proven by a test that
breaks with const). --report-unused-disable-directives clean repo-wide.

Wave 4-2 suppression + hygiene: 80 noqa removed via RUF100 --fix (census
correction: 81→80 after P2's probe merge); 6 were LIVE (E402 ×4, E731 ×2)
— fixed at source (imports to top, lambdas → defs), not suppressed; RUF100
joined the select set. Dead exports removed: ai-scenarios.ts module,
NavItem/ThemeConfig, Spawn, MicControl + stories. D-021 corpus pin CUT
(contract dissolved with the deleted TS counterpart; would have skipped
silently forever). Version single-source (D-061): pyproject 0.6.3 =
last shipped tag, _resolve_version() importlib.metadata → tomllib
fallback (no second literal), FastAPI(version=__version__), 2 new pinning
tests. Stale comments fixed (board-client search copy, sandbox-terminal);
pricing + employers-index kept (verified still accurate). engines fields:
root node>=20 pnpm>=12.3.4, 5 workspaces node>=20.

Counts: 670 py (669 + 2 version pins − 1 dissolved pin) / 44 web / 64 cli,
zero warnings.

---ci---
phase: 4
milestone: v0.7
status: execute
---/ci---
2026-09-27 05:41:03 +00:00
CIAgent e2f3dbdc11 merge: milestone/v0.6-marketplace-engine → main (v0.6 complete — the Marketplace Engine)
The real marketplace backend behind the existing surfaces, all six
requirements (REQ-6-001..006) shipped across six patches:

- P1 (v0.5.1): postings backend — 6th D-027 store family (six tables),
  PostingSource adapter contract + seeded corpus (20+10 ported once from
  mock-data, matchScore dropped), /v1/marketplace/* public API, REAL
  apply route replacing the G-18 501 stub (D-043 gate composition
  preserved, idempotent), fail-closed admin surface (SecretStr +
  constant-time bytes compare), web client shells (G-101 placeholder
  export + FastAPI catch-all serving — the grill-caught E87 build break
  fixed before execute).
- P2 (v0.5.2): AI tagging via the D-020 pipeline (skills ≤10 enforced,
  extra=forbid honesty), tag-on-ingest, re-tag overwrite on edit,
  facets data-driving the filter sidebar.
- P3 (v0.5.3): EmbeddingProvider protocol (deterministic mock-first;
  OpenAI-compatible real path with key redaction — probe-corrected:
  ollama-cloud exposes no /embeddings), SQLite-local float32 vectors
  with lazy re-embed, hybrid facet+cosine search, computed match
  scores ONLY in search context (G-106).
- P4 (v0.5.4): employer enrichment — append-only provenance rows,
  merge-on-read manual>llm>raw with visible per-field markers (A-304),
  enrich-on-first-publish; resume parsing — pypdf (the only new dep),
  honest bounds (2MB, text-layer-required, no OCR), DRAFT-then-confirm
  gate with ParsedProfile re-validation, raw bytes never stored/logged.
- P5 (v0.5.5): SEO — build-time metadata + OG + JSON-LD on the static
  set, client JobPosting/Organization JSON-LD on runtime pages,
  dynamic /sitemap.xml + /robots.txt (request-time enumeration, API
  beats the static mount, every URL resolves 200, XML-escaped,
  forgery-hardened, G-105 fail-honest unset-origin behavior).
- P6 (v0.5.6): final review CLEAN (zero P0s; all G-101..G-110 honored;
  MH-M1..M6 met; admin-token bytes-compare + catch-order fixes) +
  audit PASS (reconstruction clean, discipline intact).

670 backend tests (+182 over v0.5's 488), web 53/53 (+31), CLI 61/61,
typecheck green, ruff clean, static export builds (G-101 shells).

Escalation note: merge_to_main hook — proceeding per full autonomy
(D-007); the v0.6 scope was auto-decided at SPECIFY (D-047, confidence
0.80) and every phase shipped under the per-phase + final gates.

---ci---
phase: 6
milestone: v0.6
status: complete
requirements:
  covered: [REQ-6-001, REQ-6-002, REQ-6-003, REQ-6-004, REQ-6-005, REQ-6-006]
  partial: []
---/ci---
2026-09-26 15:06:37 +00:00
CIAgent 282f5ef150 feat(P04): design/sim environment kinds — template registry, exec policy, kind-aware client (REQ-5-005/006, D-044/45)
Wave 4-1: TaskTemplate gains environment: Literal[build, design, simulation]
+ harness_command, with the G-15 shlex-roundtrip validator (quote-free argv
only — the TS client splits whitespace-only; violations are authoring bugs
caught at definition time). New templates: tpl-conversation-flow-design
(stack-designer-c001; flow.md artifact + validate_flow.py harness) and
tpl-sensor-benchmark (stack-orchestration-c011; simulate.py pipeline +
pytest). VariantRecord/VariantResponse/TS TaskVariant carry environment +
test_command (a-11: REQUIRED on the wire — closes the dead-field gap; the
Run/Test buttons stop hardcoding pytest). Generator stamps both fields.

Wave 4-2: per-kind exec command policy at the exec route — EXACT argv[0]
token matching against a generic file/nav set; sh -c passthrough DISALLOWED
for design/sim kinds (the digest-gaming vector); 422 names the allowed
set; build kind unchanged (v0.3 semantics). SandboxManager gains a
sandbox_id→task_id side-table; the policy resolves the variant's kind by
task_id BEFORE execution.

Wave 4-3: use-sandbox-session.test() uses variant.test_command
(whitespace split, G-15); build-surface RunControls commands come from
the variant.

Wave 4-4: digest pin — compute_digest over a synthetic design-kind trace
produces the same feature classes; TraceDigest has no environment field
(now asserted). Hermeticity fix: identity gate tests pin db_path to
tmp_path (a default-path app was picking up a stale-schema ~/.nextcraft
db); stale dev DB removed.

473 backend tests (+10: registry kinds, G-15 roundtrip, design/sim
generation with kind + starter files + commands, exec policy 422/passthrough/
allowed/build-unchanged, digest kind-agnostic pin). Web 12/12; CLI 45/45;
typecheck 8/8; export builds; ruff clean.

---ci---
phase: 4
milestone: v0.5
status: execute
requirements: {covered: [REQ-5-005, REQ-5-006], partial: []}
---/ci---
2026-09-13 20:58:55 +00:00
CIAgent 12b2300f6f fix(P07): final review — CORS PUT, WS origin gate, ingest leak+O(n²), symlink escape, retry leak, doc-reality gaps
---ci---
phase: 7
milestone: v0.3
status: review
lessons:
  - P0 CORS: allow_methods lacked PUT while the build surface writes files with PUT — every cross-origin Save failed preflight; pinned with tests/api/test_cors.py
  - P0 ingest leak: queue-overflow flood path returned without the disconnect sentinel, parking the drainer forever (one leaked task-set per flooded trace); sentinel now always enqueued, real-server regression test added
  - P1 perf: flood cap counted rows via len(get_trace(...)) — O(trace) per append, O(n²) per session; TraceStore.count() (COUNT(*)) added and wired
  - P0 security: file routes followed exec-planted symlinks out of the workspace bind; _resolve_in_workspace refuses escapes (422), read/write now 404 on unknown sandboxes (was 500)
  - P1 security: WS ingest accepted any browser Origin (CORS middleware does not cover WS); localhost dev origins + no-Origin (capture agent) allowed, others 1008
  - P1 correctness: use-sandbox-session leaked a created sandbox on any mid-start failure (per-learner cap 1 → all retries 429 forever); failed starts now destroy what they created
  - P2 testing: reconnect-flush test killed mid-burst (nondeterministic under load, reproduced on pre-change code); now waits for server-side observation of the pre-kill burst — the underlying one-line replay-margin/ACK gap is documented for v0.4
  - maintainability: grading-store/templates/grading.ts docstrings claimed grading is variant-blind (stale pre-P4 text) — updated; ARCHITECTURE.md referenced nonexistent voice/openai_audio.py; dead if TYPE_CHECKING: pass blocks removed
---/ci---
2026-09-12 20:02:10 +00:00
CIAgent b4ae388f22 feat(P06): UI primitives + defense TS types (Wave 2, tasks 6-2-02/6-2-03)
packages/ui: TerminalFrame (CUT-2 read-only exec-output viewer, aria-live streaming),
MicControl (consent-first states incl. denied/unsupported), GradeBadge (verdict + gate
outcomes), TelemetryStatus (live pulse/disconnected), TranscriptViewer (role-styled turns
with latency chips) — token-driven, dark mode, WCAG AA (contrast verified per pair),
stories for each.
packages/types/defense.ts: DefenseSession/Turn/Verdict/VoiceDescriptor/IntegritySignal +
response interfaces, field-for-field Python parity with documented wire deltas.

typecheck 7/7 green.

---ci---
phase: 6
milestone: v0.3
status: execute
requirements: {covered: [REQ-3-008], partial: []}
---/ci---
2026-09-12 05:47:30 +00:00
CIAgent 4acffac71e feat(P04): variants API + TS types (Wave 3)
Task 4-3-01: POST /v1/variants (template_id or competency_id resolution; cache-first
D-029; 404 unknown template/competency; 422 neither), GET /v1/variants/{task_id},
GET /v1/variants?learner_id=. SQLiteVariantStore + VariantGenerator wired into lifespan.
Task 4-3-02: packages/types/variants.ts (TaskVariant, VariantParams) + grading.ts
(RubricScore + GradeRecord, criteria-typed) — field-for-field Python parity,
scores typed as the documented rubric-or-gate union.

11 endpoint tests green (distinct learners -> distinct statements at API level; cache
hit -> zero LLM calls); suite 324 green; typecheck 7/7; ruff clean.

---ci---
phase: 4
milestone: v0.3
status: execute
requirements: {covered: [REQ-3-005], partial: []}
---/ci---
2026-09-12 03:21:11 +00:00
CIAgent cfdceac17a feat(P02): telemetry models + TraceStore SQLite + TS types (Wave 1)
Task 2-1-01: TelemetryEvent (SQLModel table, composite PK learner/task/seq) + TraceSpan
derived view; SQLAlchemy @validates enforcement (sqlmodel drops Field constraints on table
models). Task 2-1-02: TraceStore protocol (D-019-mirrored) + SQLiteTraceStore with WAL +
synchronous=NORMAL (a-3); concurrent writer/reader no database-locked; idempotent
dedup-on-retry. Task 2-1-03: TS TelemetryEvent/TraceSpan mirroring Python field-for-field
(snake_case for byte-identical JSON); full typecheck green.

195/195 + typecheck pass; ruff clean.

---ci---
phase: 2
milestone: v0.3
status: execute
requirements: {covered: [REQ-3-003], partial: []}
---/ci---
2026-09-12 00:47:45 +00:00
CIAgent 88a1dab810 docs(milestone): complete v0.2-ai-tutor-architecture
---ci---
phase: 7
milestone: v0.2
status: complete
requirements:
  covered: [REQ-2-001, REQ-2-002, REQ-2-003, REQ-2-004, REQ-2-005, REQ-2-006, REQ-2-007, REQ-2-008, REQ-2-009, REQ-2-010, REQ-2-011, REQ-2-012]
  partial: []
---/ci---

Milestone v0.2 (ai-tutor-architecture) merged to main.

Escalation record (audit remediation, durable): P1 executor
delegation failed twice (empty subagent results, zero files
created); auto-resolved at full autonomy to inline execution with
identical plan fidelity (commit 3271373, reflog-only after phase
branch squash-delete).
2026-09-11 17:34:50 +00:00
CIAgent 810485ecc8 docs(milestone): complete v0.1-nextcraft-ui-prototype
---ci---
phase: 7
milestone: v0.1
status: complete
requirements:
  covered: [REQ-001, REQ-002, REQ-003, REQ-004, REQ-005, REQ-006, REQ-007, REQ-008, REQ-009, REQ-010, REQ-011, REQ-012, REQ-013, REQ-014, REQ-015, REQ-016, REQ-017, REQ-018, REQ-019, REQ-020, REQ-021, REQ-022, REQ-023, REQ-024, REQ-025, REQ-026, REQ-027, REQ-028]
  partial: []
---/ci---

Milestone v0.1 (nextcraft-ui-prototype) complete.

Summary:
- 7 phases (P0 pre-execution + P1-P6 execution + P7 final review)
- 28 requirements covered (all complete)
- 4 surfaces: Learner (7 pages), Marketplace (5), Employer Dashboard (4), Admin (4)
- 19 routes, 104 TypeScript files
- Shared component library (5 primitives + design tokens)
- Mock data: 5 competency stacks (70 competencies), 20 jobs, 15 candidates, 10 employers
- Tech: Next.js 15, Tailwind CSS v4, lucide-react, recharts, @xyflow/react, Inter font
- Storybook with 6 stories
- Dark mode, breadcrumbs, role switcher, responsive design
- Build passes, typecheck passes, Storybook build passes

Phases:
  P0 pre-execution     → v0.0.1
  P1 project-scaffolding → v0.0.2
  P2 learner-surface   → v0.0.3
  P3 marketplace-surface → v0.0.4
  P4 employer-dashboard → v0.0.5
  P5 admin-surface     → v0.0.6
  P6 polish-integration → v0.0.7
  P7 final-review-ship → v0.1.0 (milestone release)
2026-09-10 22:47:56 +00:00