fix template, remove okr, use casan.*

This commit is contained in:
thanhnv
2026-07-18 16:45:31 +07:00
parent 0dfd1742d3
commit 13fae3e6c3
249 changed files with 4881 additions and 5702 deletions
@@ -1,6 +1,6 @@
# STEP 1: SRS Generation Report
Generated docs/output/ipa-docs/srs/srs-mod01-okr-management.md from docs/input/okr-requirement.md.
Generated docs/output/ipa-docs/srs/srs-mod01-okr-management.md from apps/okr/domain/input/okr-requirement.md. source=template note=CASAN_GEN_MODE=template.
<!-- STEP-RESULT
status: COMPLETE
@@ -1,6 +1,6 @@
# STEP 2: Business Design Report
Generated docs/output/ipa-docs/bd/bd-mod01-okr-management.md.
Generated docs/output/ipa-docs/bd/bd-mod01-okr-management.md. source=template note=CASAN_GEN_MODE=template.
<!-- STEP-RESULT
status: COMPLETE
@@ -1,6 +1,6 @@
# STEP 3: Specify Report
Generated docs/output/specs/001-okr-web-app/spec.md.
Generated docs/output/specs/001-okr-web-app/spec.md. source=template note=CASAN_GEN_MODE=template.
<!-- STEP-RESULT
status: COMPLETE
@@ -1,10 +1,10 @@
## Spec Conformance Review Report
Criteria checked: FR coverage, role filtering, validation, golden regression. Missing: none. model-judge: REJECTED (tokens=420).
Criteria checked: requirement coverage, validation, acceptance, source trace, golden regression. Missing: none. model-judge: SKIP (model_unavailable).
<!-- STEP-RESULT
status: COMPLETE
verdict: REJECTED
verdict: APPROVED
artifacts:
- docs/output/specs/001-okr-web-app/spec.md
critical-issues:
@@ -1,6 +1,6 @@
# STEP 5: Plan Report Attempt 1
Generated docs/output/specs/001-okr-web-app/plan.md.
Generated docs/output/specs/001-okr-web-app/plan.md. source=template note=CASAN_GEN_MODE=template.
<!-- STEP-RESULT
status: COMPLETE
@@ -1,6 +1,6 @@
# STEP 5: Plan Report Attempt 2
Generated docs/output/specs/001-okr-web-app/plan.md.
Generated docs/output/specs/001-okr-web-app/plan.md. source=template note=CASAN_GEN_MODE=template.
<!-- STEP-RESULT
status: COMPLETE
@@ -1,6 +1,6 @@
## Plan Conformance Review Report — Attempt 1
Criteria checked against plan.md and required companion artifacts. model-judge: SKIP (rule_already_rejected). Verdict is REJECTED.
Criteria checked against plan.md and required companion artifacts. model-judge: SKIP (rule_already_rejected). Verdict is REJECTED. Rollback attempted but failed (tx=56b6f5f6-a343-4958-a557-167ef20fd392).
<!-- STEP-RESULT
status: COMPLETE
@@ -1,10 +1,10 @@
## Plan Conformance Review Report — Attempt 2
Criteria checked against plan.md and required companion artifacts. model-judge: REJECTED (tokens=373). Verdict is REJECTED. Rollback executed: plan restored to pre-overwrite state (tx=56b6f5f6-a343-4958-a557-167ef20fd392).
Criteria checked against plan.md and required companion artifacts. model-judge: SKIP (model_unavailable). Verdict is APPROVED.
<!-- STEP-RESULT
status: COMPLETE
verdict: REJECTED
verdict: APPROVED
artifacts:
- docs/output/specs/001-okr-web-app/plan.md
- docs/output/specs/001-okr-web-app/data-model.md
@@ -1,6 +1,6 @@
# STEP 7: Detail Design Report
Generated docs/output/ipa-docs/dd/dd-mod01-okr-management.md.
Generated docs/output/ipa-docs/dd/dd-mod01-okr-management.md. source=template note=CASAN_GEN_MODE=template.
<!-- STEP-RESULT
status: COMPLETE
@@ -1,6 +1,6 @@
# STEP 8: Testkit Report
Generated docs/output/ipa-docs/testcase/testcase-mod01-okr-management.md.
Generated docs/output/ipa-docs/testcase/testcase-mod01-okr-management.md. source=template note=CASAN_GEN_MODE=template.
<!-- STEP-RESULT
status: COMPLETE
@@ -1,6 +1,6 @@
# STEP 9: Tasks Report
Generated docs/output/specs/001-okr-web-app/tasks.md.
Generated docs/output/specs/001-okr-web-app/tasks.md. source=template note=CASAN_GEN_MODE=template.
<!-- STEP-RESULT
status: COMPLETE
@@ -0,0 +1,12 @@
# STEP 10: Implementation Draft Report
Generated docs/output/specs/001-okr-web-app/implementation.md. source=template note=CASAN_GEN_MODE=template. acceptance=pending STEP12.
<!-- STEP-RESULT
status: COMPLETE
verdict: APPROVED
artifacts:
- docs/output/specs/001-okr-web-app/implementation.md
critical-issues:
- none
/STEP-RESULT -->
@@ -1,18 +1,18 @@
# STEP 10: Code Review Report
Reviewed 5 backend/test files. DB data usage verification: Prisma Client used, frontend API client used, seed data exists, no static endpoint data found. model-judge: SKIP (rule_already_rejected).
Reviewed 7 manifest implementation evidence files across 2 source roots. model-judge: SKIP (model_unavailable).
<!-- STEP-RESULT
status: COMPLETE
verdict: REJECTED
verdict: APPROVED
artifacts:
- backend/src/auth/auth.service.ts
- backend/src/objectives/objectives.service.ts
- backend/src/key-results/key-results.service.ts
- backend/test/e2e.test.ts
- backend/test/services.test.ts
- frontend/src/lib/api.ts
- backend/prisma/seed.ts
- apps/okr/backend/src/auth/auth.service.ts
- apps/okr/backend/src/objectives/objectives.service.ts
- apps/okr/backend/src/key-results/key-results.service.ts
- apps/okr/backend/test/e2e.test.ts
- apps/okr/backend/test/services.test.ts
- apps/okr/frontend/src/lib/api.ts
- apps/okr/backend/prisma/seed.ts
critical-issues:
- golden test not found
- none
/STEP-RESULT -->
@@ -0,0 +1,167 @@
# STEP 12: Run Tests Report
Commands: npm run build ; npm test
Exit codes: 0, 0
Accepted implementation: yes
## Output
$ npm run build
> build
> npm run build -w @ainative-okr/backend && npm run build -w @ainative-okr/frontend
> @ainative-okr/backend@1.0.0 build
> prisma generate && tsc -p tsconfig.build.json
Prisma schema loaded from prisma/schema.prisma
✔ Generated Prisma Client (v6.19.3) to ./../../../node_modules/@prisma/client in 92ms
Start by importing your Prisma Client (See: https://pris.ly/d/importing-client)
Tip: Want to turn off tips and other hints? https://pris.ly/tip-4-nohints
> @ainative-okr/frontend@1.0.0 build
> tsc -b && vite build
vite v5.4.21 building for production...
transforming...
✓ 162 modules transformed.
rendering chunks...
computing gzip size...
dist/index.html 0.40 kB │ gzip: 0.27 kB
dist/assets/index-BMPUmgei.css 12.42 kB │ gzip: 3.11 kB
dist/assets/index-Cfmh-34d.js 351.46 kB │ gzip: 109.32 kB
✓ built in 1.19s
warn The configuration property `package.json#prisma` is deprecated and will be removed in Prisma 7. Please migrate to a Prisma config file (e.g., `prisma.config.ts`).
For more information, see: https://pris.ly/prisma-config
$ npm test
> test
> npm test -w @ainative-okr/backend && npm test -w @ainative-okr/frontend
> @ainative-okr/backend@1.0.0 test
> npm run db:setup && npm run seed:test && cross-env DATABASE_URL=file:./test.db JWT_SECRET=test-secret node --import tsx --test test/services.test.ts test/e2e.test.ts test/llm-judge.test.ts
> @ainative-okr/backend@1.0.0 db:setup
> npm run gen:sqlite-schema && prisma generate --schema prisma/schema.sqlite.prisma && cross-env DATABASE_URL=file:./test.db prisma db push --schema prisma/schema.sqlite.prisma --force-reset --skip-generate --accept-data-loss
> @ainative-okr/backend@1.0.0 gen:sqlite-schema
> node scripts/make-sqlite-schema.mjs
Wrote /Users/thanhnguyen/Documents/AI/HarnessHkt/Harness_Hakathon/Output_CASAN5_REFINED/apps/okr/backend/prisma/schema.sqlite.prisma (sqlite provider) from schema.prisma
Prisma schema loaded from prisma/schema.sqlite.prisma
✔ Generated Prisma Client (v6.19.3) to ./../../../node_modules/@prisma/client in 72ms
Start by importing your Prisma Client (See: https://pris.ly/d/importing-client)
Tip: Interested in query caching in just a few lines of code? Try Accelerate today! https://pris.ly/tip-3-accelerate
Prisma schema loaded from prisma/schema.sqlite.prisma
Datasource "db": SQLite database "test.db" at "file:./test.db"
The SQLite database "test.db" at "file:./test.db" was successfully reset.
🚀 Your database is now in sync with your Prisma schema. Done in 14ms
> @ainative-okr/backend@1.0.0 seed:test
> cross-env DATABASE_URL=file:./test.db JWT_SECRET=test-secret node --import tsx prisma/seed.ts
Seed completed successfully.
✔ unauthenticated requests are rejected with 401 (172.109166ms)
✔ GET /objectives employee sees only own objectives (426.861791ms)
✔ GET /objectives manager sees all objectives (1157.492792ms)
✔ GET /objectives?quarter= filters to matching quarter only (327.964625ms)
✔ GET /objectives/:id returns objective with computedProgress and relations (352.261875ms)
✔ GET /objectives/:id returns 404 for non-existent objective (444.636416ms)
✔ GET /objectives/:id returns 403 when employee accesses another owner objective (351.875667ms)
✔ POST /objectives returns 400 for empty title (370.650875ms)
✔ POST /objectives returns 400 for invalid quarter format (369.342625ms)
✔ POST /objectives manager creates objective and receives it with NOT_STARTED status (380.596ms)
✔ POST /objectives returns 403 when employee creates for another user (340.38575ms)
✔ POST /objectives returns 404 for non-existent owner (350.651625ms)
✔ GET /key-results/:id returns KR with nested objective (357.710833ms)
✔ GET /key-results/:id returns 404 for non-existent KR (316.1865ms)
✔ GET /key-results/:id returns 403 when employee reads another owner KR (345.550208ms)
✔ POST /key-results employee creates KR on own objective (360.720209ms)
✔ POST /key-results returns 403 when employee creates KR on another owner objective (337.912167ms)
✔ PATCH /key-results/:id/progress updates progress and returns updated KR (382.429875ms)
✔ PATCH /key-results/:id/progress returns 400 for out-of-range values (369.492959ms)
✔ PATCH /key-results/:id/progress returns 403 when employee updates another owner KR (358.577584ms)
✔ PATCH /key-results/:id/progress returns 404 for non-existent KR (718.129958ms)
✔ golden: manager objective list does not drift (370.856042ms)
✔ golden: employee objective list does not drift (357.055625ms)
✔ golden: objective detail (GET /objectives/1) does not drift (367.342042ms)
﹣ LLM judge: manager objective list passes all semantic invariants (0.362625ms) # Set ANTHROPIC_API_KEY to enable the LLM-judge gate
﹣ LLM judge: employee objective list passes all semantic invariants (0.05025ms) # Set ANTHROPIC_API_KEY to enable the LLM-judge gate
﹣ LLM judge: objective detail passes all semantic invariants (0.045708ms) # Set ANTHROPIC_API_KEY to enable the LLM-judge gate
✔ AuthService rejects invalid password with UnauthorizedException (351.825917ms)
✔ AuthService rejects non-existent user with UnauthorizedException (2.384291ms)
✔ AuthService accepts correct credentials and returns signed JWT (325.370917ms)
✔ AuthService accepts login by email as well as username (1139.329791ms)
✔ ObjectivesService.list employee sees only own objectives (2.531208ms)
✔ ObjectivesService.list manager sees all objectives (5.079792ms)
✔ ObjectivesService.list quarter filter narrows results to matching quarter only (6.193708ms)
✔ ObjectivesService.getById returns objective with computedProgress (3.766042ms)
✔ ObjectivesService.getById employee accessing own objective succeeds (2.305791ms)
✔ ObjectivesService.getById employee accessing another user objective throws ForbiddenException (3.020833ms)
✔ ObjectivesService.getById non-existent id throws NotFoundException (2.215667ms)
✔ ObjectivesService.create sets status to NOT_STARTED and loads relations (8.258375ms)
✔ ObjectivesService.create employee creating for another user throws ForbiddenException (1.617375ms)
✔ ObjectivesService.create with non-existent owner throws NotFoundException (2.16625ms)
✔ KeyResultsService.getById returns KR with nested objective and owner (3.454208ms)
✔ KeyResultsService.getById employee reading another owner KR throws ForbiddenException (2.787667ms)
✔ KeyResultsService.getById non-existent id throws NotFoundException (2.847833ms)
✔ KeyResultsService.updateProgress blocks employee updating KR from another owner (6.831375ms)
✔ KeyResultsService.updateProgress records new progress value and creates ProgressUpdate (12.313709ms)
✔ KeyResultsService.updateProgress non-existent KR throws NotFoundException (1.932584ms)
✔ KeyResultsService status recalculation: NOT_STARTED → IN_PROGRESS → COMPLETED → IN_PROGRESS (34.320583ms)
✔ KeyResultsService averageProgress: multi-KR completion drives COMPLETED status (24.039875ms)
ℹ tests 49
ℹ suites 0
ℹ pass 46
ℹ fail 0
ℹ cancelled 0
ℹ skipped 3
ℹ todo 0
ℹ duration_ms 10780.965083
> @ainative-okr/frontend@1.0.0 test
> vitest run
RUN v3.2.6 /Users/thanhnguyen/Documents/AI/HarnessHkt/Harness_Hakathon/Output_CASAN5_REFINED/apps/okr/frontend
✓ src/__tests__/okr.test.tsx (16 tests) 26ms
Test Files 1 passed (1)
Tests 16 passed (16)
Start at 15:39:53
Duration 965ms (transform 48ms, setup 51ms, collect 146ms, tests 26ms, environment 254ms, prepare 44ms)
warn The configuration property `package.json#prisma` is deprecated and will be removed in Prisma 7. Please migrate to a Prisma config file (e.g., `prisma.config.ts`).
For more information, see: https://pris.ly/prisma-config
warn The configuration property `package.json#prisma` is deprecated and will be removed in Prisma 7. Please migrate to a Prisma config file (e.g., `prisma.config.ts`).
For more information, see: https://pris.ly/prisma-config
<!-- STEP-RESULT
status: COMPLETE
verdict: PASS
artifacts:
- docs/output/specs/001-okr-web-app/implementation.md
- docs/output/specs/001-okr-web-app/implementation.accepted.json
critical-issues:
- none
/STEP-RESULT -->