Repository navigation
feat: Phase E+F — complete app build, CI/CD, and supporting artifacts - #177
Merged
Merged
Conversation
- POST /api/roles/invite — invite coach/admin by GitHub username - GET /api/roles — paginated role list (hackathon-scoped) - DELETE /api/roles/:id — remove role (primary admin protected) - GET /api/audit/:hackathonId — paginated audit trail with action filter - GET /api/config — list all app-wide config values - PATCH /api/config/:key — update config (read-only keys protected) Added isGlobalAdmin() for app-wide admin checks (config endpoints). 3 Zod schemas: role invite, audit list, config update. 24 tests covering auth, RBAC, primary admin protection, config read-only keys, pagination, and happy paths. 131/131 tests pass, tsc + eslint clean, business rules 28/28 pass.
…/award badges - API route: GET /api/leaderboard/[hackathonId] with score aggregation, tiebreaker (earliest last-approval), grade badges (A/B/C/D), award badges (Fastest, Highest per Challenge, Perfect Score) - SSR page: /leaderboard/[id] with generateMetadata, server-rendered initial HTML for fast first paint and shareable URLs - Client component: auto-refresh polling every 30s with countdown, expandable rows for per-challenge score breakdown - Shared lib: buildLeaderboard() used by both API and SSR page - Components: GradeBadge (color-coded A/B/C/D), AwardBadge - Gate: npm run build succeeds, tsc clean, 131/131 tests pass
- Reformat page route, Award badge, and Leaderboard table for consistency - Adjust line breaks in TypeScript and JSX for readability - Add new sync-issues.prompt.md for reconciling tracker with GitHub - Update session log formatting in execution tracker
app-08-dashboard: Build all frontend pages from ui-pages.md spec. Pages (10 routes): - / (landing with auth redirect) - /join (4-digit event code onboarding) - /dashboard (role-scoped: admin/coach/hacker views) - /admin/hackathons (CRUD, launch, archive, assign teams) - /admin/teams (view teams, reassign hackers) - /admin/rubrics (create rubric, dynamic categories, activate) - /admin/audit (paginated, filterable audit trail) - /admin/roles (invite users, remove roles, primary admin protection) - /admin/config (inline edit, read-only key protection) - /leaderboard/:id (existing, unchanged) Layouts: - Admin layout with sidebar, role guard, loading state - Shell layout via Navbar component Shared components (14): navbar, admin-sidebar, status-badge, empty-state, loading-skeleton, hackathon-picker, confirm-dialog, pagination-bar, progress-bar, challenge-card, submission-form, review-card, rubric-form Infrastructure: - /api/me endpoint (auth principal + roles) - useAuth and useFetch hooks for client components - Extended lucide-react type declarations Gate: npm run build succeeds, tsc clean, 131/131 tests pass, 28/28 business rules pass
- Add leaderboard.test.ts (17 tests): ranking, tiebreaker, grade badges, award badges (Fastest to Complete, Highest Score, Perfect Score), challenge breakdown, edge cases - Add audit.test.ts (2 tests): audit record creation with all fields - Add utils.test.ts (4 tests): cn() Tailwind merge utility - Add challenge-gate.test.ts (9 tests): gate checking, progression advancement with ETag, edge cases - Add health.test.ts (1 test): health endpoint - Add me.test.ts (7 tests): auth, role derivation, dev bypass, error handling - Add leaderboard-api.test.ts (3 tests): route handler with cache headers - Extend roles.test.ts with isGlobalAdmin tests (4 tests) - Configure @vitest/coverage-v8 with 80% thresholds - Exclude hooks from coverage (client-side React, no business logic) Coverage: lines 93.01%, branches 86.05%, functions 88.88% Gate: 178/178 tests pass, tsc clean, business rules 28/28
- Application grade A-→A: 178 tests, 93% coverage, 24 routes, 10 pages - Fix instruction count 21→28 in docs/README.md (debt #21) - All validators pass: freshness, instructions, skills, agent frontmatter - No new active debt items discovered
…nd slot swaps - hackops-ci.yml: split into 5 parallel jobs (lint, type-check, test, bicep-validate, build), add coverage artifact upload, add Bicep build+lint job, add infra path trigger - hackops-deploy.yml: add dev/prod environments with OIDC federation, staging slot swap for zero-downtime, health check verification, IaC deployment step (Bicep), manual dispatch with env selector - Both files pass actionlint with zero errors - All 178 tests pass, tsc clean
- Add audit container (11th) to seed-cosmos.ts - Add sample docs for scores, submissions, rubrics, progression, audit - Add coach role to sample data for richer testing - Create apps/web/tests/fixtures/index.ts with typed fixture data - Include Easy Auth principal headers for admin/coach/hacker simulation
- F3: docs/testing-strategy.md (test pyramid, tools, coverage targets) - F4: docs/security-checklist.md (consolidated security invariants) - F5: docs/local-dev-guide.md (step-by-step local setup) - F6: Updated QUALITY_SCORE.md, docs/README.md, copilot-instructions.md - Updated session tracker: Phase F complete, session #30 logged
Phase F artifacts reviewed and updated: - Refined docs/testing-strategy.md, docs/security-checklist.md, docs/local-dev-guide.md - Updated docs/exec-plans/active/hackops-execution.md formatting - Synchronized QUALITY_SCORE.md and README meta-documentation - Enhanced scripts/seed-cosmos.ts and test fixtures formatting - Updated copilot-instructions.md
1 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Completes the full HackOps application build (Phases E and F). This PR brings 18 commits from
feature/app-06-admininto main, covering the admin API, leaderboard, dashboards, full test suite, CI/CD workflows, seed script, and all supporting documentation.Type of Change
Workflow Used
Changes Made
Phase E — Application Build (app-06 through app-10):
feat(api): admin, roles, audit, config routes (app-06)feat(leaderboard): SSR page with auto-refresh, grade/award badges (app-07)feat(web): admin/hacker/coach dashboard pages and shared components (app-08)test(app-09): 178 tests across 18 files, 93% line coverage, 86% branch coverageci: hackops-ci.yml (5 jobs) + hackops-deploy.yml (dev+prod, OIDC, slot swap) (app-10)Phase F — Supporting Artifacts:
scripts/seed-cosmos.ts: 11 containers with full sample dataapps/web/tests/fixtures/index.ts: typed test fixtures + Easy Auth principal headersdocs/testing-strategy.md: test pyramid, tools, coverage targetsdocs/security-checklist.md: consolidated security invariantsdocs/local-dev-guide.md: step-by-step local dev setupTesting Performed
npx tsc --noEmitpasses cleannpm test— 178/178 tests passnpm run lint:md— 0 errorsnpm run validate— all validators pass