平台处理进展

最近的服务
处理进展

这里会持续读取最新处理记录、当前重点和历史快照。页面会自动刷新,所以你不用反复找人确认, 也能知道问题现在推进到哪一步。

自动巡检 activeactive执行状态 queued更新于 20 July 2026, 5:20 pm
20 秒后自动刷新

当前阶段

between Phase 3 and Phase 4

P0 完成度

about 50%

P1 完成度

about 35% to 40%

整体对齐度

about 45%

当前重点

the repo now has auth hardening, CI security gates, migration-backed bootstrap, SQLite backup/restore drills with admin-visible recovery evidence, a persisted admin operation audit trail, a repo-backed system config center baseline, repo-backed feature flag management, real RUM/Core Web Vitals ingestion, API request telemetry with trace correlation, async task trace propagation into worker logs, and admin-visible API-to-worker trace correlation; the main repo-fixable V2.3 gaps are now broader production telemetry integration and data-governance documentation, while the smoke browser issue remains an environment-level Windows browser permission boundary

本地执行状态

round 103

当前第 7133 轮还在执行中,下面展示的是最近一次已经完成的记录。

Round finished; next round queued

状态更新于 20 July 2026, 5:20 pm

最新记录

最近一次处理记录

2026-04-15-v23-remediation-progress.md

更新于 20 July 2026, 5:20 pm

# V2.3 Remediation Progress
Date: 2026-04-15
Status: active
Mode: continuous heartbeat
Current focus: the repo now has auth hardening, CI security gates, migration-backed bootstrap, SQLite backup/restore drills with admin-visible recovery evidence, a persisted admin operation audit trail, a repo-backed system config center baseline, repo-backed feature flag management, real RUM/Core Web Vitals ingestion, API request telemetry with trace correlation, async task trace propagation into worker logs, and admin-visible API-to-worker trace correlation; the main repo-fixable V2.3 gaps are now broader production telemetry integration and data-governance documentation, while the smoke browser issue remains an environment-level Windows browser permission boundary
Last updated: 2026-04-16 08:16:26 +10:00
Summary:
- Automation `v23-remediation` is active and configured to continue with no intentional long wait between rounds.
- A public `/progress` page has been added so the user can inspect the latest repair status from the browser.
- Round 01 has started and written a repo change so the user can confirm the automation is moving.
Round 01:
- Summary: added the first visible repo fix by landing baseline frontend security headers and keeping the site green.

当前基线

当前状态快照

2026-04-15-v23-gap-audit.md

更新于 20 July 2026, 5:20 pm

# TaskGPU vs V2.3 Gap Audit
Date: 2026-04-15
Standard used:
- `\\tsclient\Documents\Taskgpu\通用项目开发需求细则V2.3.docx`
Audit scope:
- current local repository state in this workspace
- code, tests, docs, CI, deploy scripts, and launch preparation
- judgment standard: "can this project pass the V2.3 release gate", not just "is there a usable demo"
## Executive Summary
Current project maturity is above prototype level and is suitable for internal demo / MVP walkthrough.
It does not yet satisfy the V2.3 standard for a release-ready product.
Estimated completion against the standard:

阶段摘要

每一轮都先讲人话

每一轮处理都会整理成一张短卡片,方便你快速看清这轮改了什么、影响到哪里、有没有做过验证。

Round 103

added admin-visible API and worker trace correlation.

visible

影响范围

release observability from the V2.3 audit, limited to surfacing async task trace continuity in admin monitoring.

这轮变更

extended admin monitoring with `api_worker_trace_correlation_24h` and `recent_traced_tasks`, added the response schema fields, and expanded the worker trace regression test to verify admin monitoring sees the same API-to-worker trace id chain.

验证结果

`python -m pytest apps/api/tests/test_worker_request_trace.py -q` passed with 1 test, confirming admin monitoring now exposes trace-correlated tasks and worker runs.

Round 102

linked task worker logs to the original API trace id.

visible

影响范围

release observability from the V2.3 audit, limited to extending trace correlation from the API request layer into async task creation and worker execution logs.

这轮变更

added `tasks.trace_id` plus a migration, persisted the incoming request `trace_id` when creating tasks, exposed `trace_id` on task reads, and updated the worker scheduler to reuse that trace context so `worker_task_started`, dispatch, and completion logs carry the same trace id as the originating API request.

验证结果

`python -m pytest apps/api/tests/test_observability.py apps/api/tests/test_worker_request_trace.py -q` passed with 4 tests, confirming API trace headers still work and worker lifecycle logs now reuse the original task trace id.

Round 101

added API trace ids and admin request telemetry summary.

visible

影响范围

release observability from the V2.3 audit, limited to server-side trace correlation, persisted API request telemetry, and a 24-hour admin summary of request health.

这轮变更

added the `api_request_telemetry` model plus migration, extended API observability context to carry `trace_id`, updated the request middleware to emit `X-Trace-ID`, persist per-request telemetry, and log trace-aware completion and failure events, and extended admin monitoring with `api_request_telemetry_24h_summary`, `api_request_telemetry_24h_by_status`, and `api_trace_correlation_24h`.

验证结果

`python -m pytest apps/api/tests/test_observability.py -q` passed with 3 tests, confirming trace headers, persisted request telemetry, exception logging, and admin monitoring aggregation.

Round 100

added real web vitals ingest and admin RUM summary.

visible

影响范围

release observability from the V2.3 audit, limited to shipping a real browser-side Core Web Vitals reporter, persisting samples in the API, and surfacing a 24-hour admin summary.

这轮变更

added the `web_vital_samples` model plus migration, added `/api/observability/web-vitals` for persisted ingest, extended admin monitoring with `web_vitals_24h_summary` and `web_vitals_24h_by_metric`, added a `WebVitalsReporter` client component to the web app root layout using Next web-vitals hooks, and added targeted API regression coverage for ingest plus monitoring output.

验证结果

`python -m pytest apps/api/tests/test_web_vitals_rum.py -q` passed with 1 test, and `npm run build` passed in `apps/web`, confirming the ingest path and browser reporter compile cleanly.

Round 99

added a repo-backed feature flag baseline.

visible

影响范围

release-platform governance from the V2.3 audit, limited to centralizing a controlled set of admin release flags and wiring one existing admin surface to respect them.

这轮变更

added the `feature_flag_entries` model plus migration, added `apps/api/app/services/feature_flags.py` with typed flag definitions and runtime lookups, added `/api/admin/feature-flags` read/write routes, wired `/api/admin/monitoring/overview` to the `release_admin_monitoring` flag, and audited flag mutations through the existing admin audit log.

验证结果

`python -m pytest apps/api/tests/test_feature_flags.py -q` passed with 1 test, confirming feature flag updates are persisted, admin-visible, audited, and enforced by the admin monitoring route.

Round 98

added a repo-backed system config center baseline.

visible

影响范围

release-platform governance from the V2.3 audit, limited to centralizing a controlled set of runtime settings and wiring the existing retention policy path to use them.

这轮变更

added the `system_config_entries` model plus migration, added `apps/api/app/services/system_config.py` with typed config definitions and retention policy lookups, added `/api/admin/system-config` read/write routes, wired monitoring and retention cleanup to use persisted retention overrides, and audited config mutations through the existing admin audit log.

验证结果

`python -m pytest apps/api/tests/test_system_config_center.py -q` passed with 1 test, confirming config updates are persisted, admin-visible, audited, and applied by retention monitoring and cleanup.

Round 97

added persistent admin action audit logs.

visible

影响范围

admin governance from the V2.3 audit, limited to recording key mutating admin actions and exposing a read path for audit review.

这轮变更

added the `admin_operation_audits` model plus migration, wired persisted audit records into admin task retry, task cancel, password recovery status update, and run-once execution routes, and added `/api/admin/audit-log` for review.

验证结果

`python -m pytest apps/api/tests/test_admin_operation_audit.py -q` passed with 1 test, confirming the audited admin actions are written to storage and readable through the new audit endpoint.

Round 96

added failed scheduled-plan visibility.

visible

影响范围

operational recovery from the V2.3 audit, limited to surfacing the latest failed backup and restore evidence together with any scheduled plans that failed recently inside the existing admin monitoring endpoint.

这轮变更

extended `apps/api/app/services/tasks.py` and `apps/api/app/schemas/task.py` so `/api/admin/monitoring/overview` now returns `backup_recovery_failure_health` with latest failed operation timestamps, 7-day failure counts, and recent failed scheduled plan names, and extended `apps/api/tests/test_auth_wallet_tasks.py` to verify the new failure-health summary against a controlled backup history file.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q -k backup_recovery_evidence` passed with 1 test, confirming admin monitoring now exposes backup and restore failure health alongside the existing recovery summaries.

Round 95

added backup failure health summary.

visible

影响范围

operational recovery from the V2.3 audit, limited to surfacing the latest failed backup and restore evidence and recent failure counts inside the existing admin monitoring endpoint.

这轮变更

extended `apps/api/app/services/tasks.py` and `apps/api/app/schemas/task.py` so `/api/admin/monitoring/overview` now returns `backup_recovery_failure_health` with latest failed operation timestamps, 7-day failure counts, and recent failed scheduled plan names, and extended `apps/api/tests/test_auth_wallet_tasks.py` to verify the new failure-health summary against a controlled backup history file.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q -k backup_recovery_evidence` passed with 1 test, confirming admin monitoring now exposes backup and restore failure health alongside the existing recovery summaries.

Round 94

added backup failure trend summary.

visible

影响范围

operational recovery from the V2.3 audit, limited to recording failed backup and restore attempts and surfacing a 30-day failure trend inside the existing monitoring and drill path.

这轮变更

extended `infra/deploy/backup_restore_sqlite.py` to write failed `backup`, `restore`, and `scheduled_backup` attempts to history, extended `apps/api/app/services/tasks.py` and `apps/api/app/schemas/task.py` so `/api/admin/monitoring/overview` now returns `backup_recovery_failures_30d_daily`, and extended backup and admin monitoring tests to verify both the failure history record and the new 30-day failure trend.

验证结果

`python -m pytest apps/api/tests/test_backup_restore_snapshot.py apps/api/tests/test_auth_wallet_tasks.py -q -k "restore_failure_is_written_to_history or backup_recovery_evidence"` passed with 2 tests, confirming failed restore attempts are persisted to history and surfaced in admin monitoring.

Round 93

added 30-day restore readiness trend.

visible

影响范围

operational recovery from the V2.3 audit, limited to surfacing a longer-window daily restore-readiness view inside the existing admin monitoring endpoint.

这轮变更

extended `apps/api/app/services/tasks.py` and `apps/api/app/schemas/task.py` so `/api/admin/monitoring/overview` now returns `backup_recovery_readiness_30d_daily` with per-day backup evidence counts, restore counts, scheduled plan coverage counts, and `recovery_ready` flags, and extended `apps/api/tests/test_auth_wallet_tasks.py` to verify the new 30-day readiness trend against a controlled backup history file.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q -k backup_recovery_evidence` passed with 1 test, confirming admin monitoring now exposes the 30-day restore-readiness trend.

Round 92

added backup recovery trend history.

visible

影响范围

operational recovery from the V2.3 audit, limited to surfacing a 7-day daily history of backup, scheduled-backup, and restore evidence inside the existing admin monitoring endpoint.

这轮变更

extended `apps/api/app/services/tasks.py` and `apps/api/app/schemas/task.py` so `/api/admin/monitoring/overview` now returns `backup_recovery_7d_daily` with per-day backup, scheduled-backup, and restore counts, and extended `apps/api/tests/test_auth_wallet_tasks.py` to verify the daily history against a controlled backup history file.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q -k backup_recovery_evidence` passed with 1 test, confirming admin monitoring now exposes the 7-day backup and restore history trend.

Round 91

added restore readiness summary.

visible

影响范围

operational recovery from the V2.3 audit, limited to reporting whether recent backup evidence, scheduled plan coverage, and restore drill freshness are sufficient inside the existing admin monitoring endpoint.

这轮变更

extended `apps/api/app/services/tasks.py` and `apps/api/app/schemas/task.py` so `/api/admin/monitoring/overview` now returns `backup_recovery_readiness` with backup freshness window checks, restore-readiness window checks, schedule coverage counts, and an overall `recovery_ready` flag, and extended `apps/api/tests/test_auth_wallet_tasks.py` to verify the new readiness summary against a controlled backup history file.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q -k backup_recovery_evidence` passed with 1 test, confirming admin monitoring now surfaces restore readiness alongside backup freshness and schedule coverage.

Round 90

added backup recovery health summary.

visible

影响范围

operational recovery from the V2.3 audit, limited to summarizing backup freshness, restore freshness, and missing scheduled runs inside the existing admin monitoring endpoint.

这轮变更

extended `apps/api/app/services/tasks.py` and `apps/api/app/schemas/task.py` so `/api/admin/monitoring/overview` now returns `backup_recovery_health` with latest backup/scheduled-backup/restore timestamps, 7-day counts, and `plans_missing_recent_run`, and extended `apps/api/tests/test_auth_wallet_tasks.py` to verify the new health summary against a controlled backup history file.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q -k backup_recovery_evidence` passed with 1 test, confirming admin monitoring now summarizes backup and restore freshness plus schedule coverage.

Round 89

surfaced backup recovery evidence in admin monitoring.

visible

影响范围

operational recovery from the V2.3 audit, limited to exposing the repo backup schedule and recent recovery history through the existing admin monitoring endpoint.

这轮变更

added `backup_history_file` and `backup_plan_file` settings in `apps/api/app/config.py`, extended `apps/api/app/services/tasks.py` and `apps/api/app/schemas/task.py` so `/api/admin/monitoring/overview` now returns `scheduled_backup_plans` and `recent_backup_recovery_runs`, and extended `apps/api/tests/test_auth_wallet_tasks.py` to verify the endpoint reads a named plan plus recent backup, scheduled-backup, and restore history records.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q -k backup_recovery_evidence` passed with 1 test, confirming admin monitoring now surfaces the configured backup plan and recent recovery evidence.

Round 88

added a scheduled backup plan baseline.

visible

影响范围

operational recovery from the V2.3 audit, limited to giving the SQLite drill a repo-backed named schedule and archive retention policy.

这轮变更

extended `infra/deploy/backup_restore_sqlite.py` with named scheduled plan loading, a `scheduled-backup` command, and retention pruning, added `infra/deploy/backup_plan.example.json` as the repo baseline plan, updated `infra/deploy/README.md` and `infra/deploy/LAUNCH_CHECKLIST.md` to document scheduled execution, and extended `apps/api/tests/test_backup_restore_snapshot.py` to verify repeated scheduled runs keep the expected number of archives and emit schedule history records.

验证结果

`python -m pytest apps/api/tests/test_backup_restore_snapshot.py -q` passed with 2 tests, confirming the SQLite drill now supports named scheduled backups with retention pruning and history evidence.

Round 87

added backup and restore history evidence.

visible

影响范围

operational recovery from the V2.3 audit, limited to turning the SQLite backup drill into a repo-backed evidence trail for operators.

这轮变更

extended `infra/deploy/backup_restore_sqlite.py` so backup and restore append JSONL records and expose a `history` command, updated `infra/deploy/README.md` and `infra/deploy/LAUNCH_CHECKLIST.md` to point operators at `backup_restore_history.jsonl`, and extended `apps/api/tests/test_backup_restore_snapshot.py` to verify both backup and restore leave inspectable history records.

验证结果

`python -m pytest apps/api/tests/test_backup_restore_snapshot.py -q` passed with 1 test, confirming the SQLite drill now leaves a reusable JSONL history trail for both backup and restore operations.

Round 86

added a repo-backed SQLite backup and restore drill.

visible

影响范围

operational recovery from the V2.3 audit, limited to the repo default SQLite deployment path and its local artifact directories.

这轮变更

added `infra/deploy/backup_restore_sqlite.py` with `backup` and `restore` commands that snapshot `data/taskgpu.db` plus `delivery_artifacts/` and `imported_files/` into a zip archive, documented the drill in `infra/deploy/README.md`, and added `apps/api/tests/test_backup_restore_snapshot.py` to prove a backup can be restored into a fresh directory with database rows and artifact files intact.

验证结果

`python -m pytest apps/api/tests/test_backup_restore_snapshot.py -q` passed with 1 test, confirming the SQLite snapshot archive can be restored with both database content and artifact payloads preserved.

Round 85

added baseline database migration infrastructure.

visible

影响范围

backend platform maturity from the V2.3 audit, limited to replacing raw schema bootstrap with a tracked migration path and one baseline version.

这轮变更

added `apps/api/app/migration_runner.py` to discover and apply versioned migrations into a tracked `schema_migrations` table, added `apps/api/migrations/versions/0001_baseline.py` plus package scaffolding, switched `apps/api/app/database.py` so `init_db()` now runs migrations instead of `Base.metadata.create_all()`, added `tools/database/run_api_migrations.py` as a CLI entrypoint, and added `apps/api/tests/test_migration_runner.py` to lock the baseline migration behavior on a fresh SQLite database.

验证结果

`python -m pytest apps/api/tests/test_migration_runner.py -q` passed with 1 test, confirming a fresh database is created through the migration runner and records the applied baseline migration exactly once.

Round 84

added a CI-backed dependency audit baseline.

visible

影响范围

release-platform security from the V2.3 audit, limited to adding one repo-local dependency hygiene gate and enforcing it in GitHub Actions.

这轮变更

added `tools/security/run_dependency_audit.py` to validate bounded Python requirements, reject direct or editable requirement sources, require a modern Node lockfile, and enforce https plus integrity metadata for resolved npm packages, then wired the runner into the existing `security-baseline` job in `.github/workflows/ci.yml`.

验证结果

`python tools/security/run_dependency_audit.py` passed and reported zero violations across `apps/api/requirements.txt` and `apps/web/package-lock.json`.

Round 83

added a CI-backed API DAST baseline.

visible

影响范围

security baseline from the V2.3 audit, limited to adding a narrow HTTP-level dynamic security check and enforcing it in GitHub Actions.

这轮变更

added `tools/security/run_repo_dast.py` to exercise `/api/health` and `/api/v1/health` through FastAPI `TestClient` and assert `X-Request-ID`, `X-Content-Type-Options`, `X-Frame-Options`, `Referrer-Policy`, and `Cache-Control`, hardened `apps/api/app/main.py` to set those headers on normal and exception responses, and wired the runner into `.github/workflows/ci.yml` before the API and worker tests.

验证结果

`python tools/security/run_repo_dast.py` passed and reported both health endpoints as passing the repo DAST baseline.

Round 82

added a CI-backed repo SAST gate.

visible

影响范围

security baseline from the V2.3 audit, limited to adding a narrow static-analysis pass and enforcing it in GitHub Actions.

这轮变更

added `tools/security/run_repo_sast.py` to scan repo source for unapproved `shell=True`, `verify=False`, and dynamic `eval`/`exec` usage with a documented allowlist for the existing code editor executor, and added a new `security-baseline` job in `.github/workflows/ci.yml` to run the scanner on every push and pull request.

验证结果

`python tools/security/run_repo_sast.py` passed and reported zero violations with one documented allowlisted finding.

Round 81

added abnormal-login alerts to the auth flow.

visible

影响范围

account security from the V2.3 audit, limited to detecting unusual login fingerprints and exposing the resulting alerts to signed-in users.

这轮变更

added `AuthSecurityAlert` persistence in `apps/api/app/models.py`, exposed `GET /api/auth/security-alerts` plus alert serialization in `apps/api/app/routes/auth.py` and `apps/api/app/schemas/auth.py`, and updated the login flow to create `new_ip` and `new_device` alerts when a successful login arrives from an unseen fingerprint without flagging refresh-token rotation.

验证结果

`python -m pytest apps/api/tests/test_login_alerts.py apps/api/tests/test_session_management.py apps/api/tests/test_refresh_token.py -q` passed with 6 tests, confirming unusual logins now create user-visible alerts while the existing session and refresh flows still behave correctly.

Round 80

added `/api/v1` compatibility routing for the existing API.

visible

影响范围

backend platform maturity from the V2.3 audit, limited to closing the missing API versioning gap without breaking the current unversioned `/api/*` clients.

这轮变更

added an API version alias middleware in `apps/api/app/main.py` that rewrites `/api/v1/*` requests onto the existing `/api/*` routes, and added `apps/api/tests/test_api_versioning.py` to lock health, register, and login access through the new versioned path.

验证结果

`python -m pytest apps/api/tests/test_api_versioning.py -q` passed with 2 tests, confirming the repo now serves a working `/api/v1` compatibility layer alongside the current endpoints.

Round 79

added daily AI moderation stage-rule history to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing 7-day moderation-hit history grouped by day, stage, and moderation rule through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate blocked planner/reviewer moderation events into `ai_moderation_hits_7d_daily_by_stage_flag`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the daily stage-rule history payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes 7-day AI moderation stage+rule daily history without regressing the existing admin rollups.

Round 78

added daily AI governance stage-error history to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing 7-day governance-enforcement history grouped by day, stage, and fallback error through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate recent `gpt_workflow` fallback events with `fallback_reason=governance_incomplete` into `ai_governance_blocks_7d_daily_by_stage_error`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the daily stage-error history payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes 7-day AI governance stage+error daily history without regressing the existing admin rollups.

Round 77

added 7-day AI governance stage-error totals to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing 7-day governance-enforcement totals grouped by stage and fallback error through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate recent `gpt_workflow` fallback events with `fallback_reason=governance_incomplete` into `ai_governance_blocks_7d_by_stage_error`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the stage-error summary payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes 7-day AI governance stage+error totals without regressing the existing admin rollups.

Round 76

added 7-day AI moderation outcome totals to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing 7-day moderation outcomes grouped by stage through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate planner/reviewer moderation events into `ai_moderation_outcomes_7d_by_stage`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the 7-day moderation-outcome summary payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes 7-day AI moderation outcome totals without regressing the existing admin rollups.

Round 75

added 7-day AI moderation stage totals to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing 7-day moderation-hit totals grouped by stage through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate blocked planner/reviewer moderation events into `ai_moderation_hits_7d_by_stage`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the 7-day moderation-stage summary payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes 7-day AI moderation stage totals without regressing the existing admin rollups.

Round 74

added daily AI moderation rule history to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing 7-day moderation-hit history grouped by day and moderation rule through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate blocked planner/reviewer moderation events into `ai_moderation_hits_7d_daily_by_flag`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the daily moderation-rule history payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes 7-day AI moderation rule history without regressing the existing admin rollups.

Round 73

added 7-day AI moderation outcomes to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing 7-day moderation outcomes grouped by day and stage through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate planner/reviewer moderation events into `ai_moderation_outcomes_7d_daily_by_stage`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the daily moderation-outcome payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes 7-day AI moderation outcomes without regressing the existing admin rollups.

Round 72

added 7-day AI moderation rule totals to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing 7-day moderation-hit totals grouped by moderation rule through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate blocked planner/reviewer moderation events into `ai_moderation_hits_7d_by_flag`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the 7-day moderation-rule summary payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes 7-day AI moderation rule totals without regressing the existing admin rollups.

Round 71

added 7-day AI moderation history to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing 7-day moderation-hit history grouped by day and stage through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate blocked planner/reviewer moderation events into `ai_moderation_hits_7d_daily_by_stage`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the daily moderation-history payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes 7-day AI moderation hit history without regressing the existing admin rollups.

Round 70

added 7-day AI governance block stage totals to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing 7-day governance-enforcement totals grouped by stage through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate recent `gpt_workflow` fallback events with `fallback_reason=governance_incomplete` into `ai_governance_blocks_7d_by_stage`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the stage-summary payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes 7-day governance block stage totals without regressing the existing admin rollups.

Round 69

added daily AI governance block errors to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing 7-day governance-enforcement history grouped by day and fallback error through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate recent `gpt_workflow` fallback events with `fallback_reason=governance_incomplete` into `ai_governance_blocks_7d_daily_by_error`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the daily error-history payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes 7-day governance block daily error history without regressing the existing admin rollups.

Round 68

added 7-day AI governance block error summaries to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing 7-day governance-enforcement counts grouped by fallback error through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate recent `gpt_workflow` fallback events with `fallback_reason=governance_incomplete` into `ai_governance_blocks_7d_by_error`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the error summary payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes 7-day governance block error summaries without regressing the existing admin rollups.

Round 67

added 7-day AI governance block history to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing daily governance-enforcement history by stage through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate `gpt_workflow` fallback events with `fallback_reason=governance_incomplete` into `ai_governance_blocks_7d_daily_by_stage`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to seed older governance block events and lock the daily history payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes 7-day governance block history without regressing the existing admin rollups.

Round 66

added AI governance block trend deltas to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing recent governance-enforcement trend changes by stage through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to compare recent `governance_incomplete` fallback events between the current one-hour window and the earlier baseline window and expose `ai_governance_block_trend_deltas_by_stage`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the new payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes governance block trend deltas without regressing the existing admin rollups.

Round 65

added AI governance block history to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing recent governance-enforcement fallback events by stage through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate recent `gpt_workflow` fallback events with `fallback_reason=governance_incomplete` into `ai_governance_blocks_24h_by_stage`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to seed governance block events and lock the payload without relying on warning-stage ordering.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes recent AI governance blocks without regressing the existing admin rollups.

Round 64

enforced AI coverage before planning and review.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to blocking GPT planning or review when required eval or red-team coverage is missing for that stage.

这轮变更

extended `apps/api/app/services/gpt_workflow.py` with governance coverage checks for eval and red-team baselines before model execution, returning a `governance_incomplete` fallback when coverage is missing, and updated `apps/api/tests/test_gpt_workflow.py` with regression cases that verify the model is not called when governance coverage is absent.

验证结果

`python -m pytest apps/api/tests/test_gpt_workflow.py -q` passed with 8 tests, confirming planning and review now hard-block on missing AI governance coverage without regressing the existing GPT workflow paths.

Round 63

added an AI governance summary to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing one admin-visible summary of prompt, moderation, eval, and red-team baseline coverage through the existing monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to expose `ai_governance_summary`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the summary payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes the AI governance summary without regressing the existing admin rollups.

Round 62

added AI red-team coverage summaries to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing red-team scenario and case coverage by stage through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate `RED_TEAM_SCENARIO_REGISTRY` into `ai_red_team_coverage_by_stage`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the new payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes AI red-team coverage summaries without regressing the existing admin rollups.

Round 61

added AI red-team inventory to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing the in-repo red-team scenario baseline through the existing admin monitoring overview.

这轮变更

added `RED_TEAM_SCENARIO_REGISTRY` in `apps/api/app/services/gpt_workflow.py`, extended `apps/api/app/services/tasks.py` to expose `ai_red_team_inventory`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the new payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes the AI red-team inventory without regressing the existing admin rollups.

Round 60

added AI moderation trend deltas to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing recent moderation blocked-rate deltas by stage through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to compare recent planner and reviewer moderation outcomes in the last hour versus the prior baseline window and expose `ai_moderation_trend_deltas_by_stage`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to seed baseline moderation events and lock the new payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes AI moderation trend deltas without regressing the existing admin rollups.

Round 59

added AI eval focus summaries to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing eval focus coverage by focus term, case count, and covered stages through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate the in-repo eval registry into `ai_eval_focus_coverage`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the new payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes AI eval focus summaries without regressing the existing admin rollups.

Round 58

added AI eval coverage summaries to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing eval-set and case-count coverage by stage through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate the in-repo eval registry into `ai_eval_coverage_by_stage`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the new payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes AI eval coverage summaries without regressing the existing admin rollups.

Round 57

added AI moderation outcome rates to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing recent moderation totals, blocked counts, passed counts, and blocked rates by stage through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate recent `planner` and `reviewer` moderation outcomes into `ai_moderation_outcomes_24h_by_stage`, updated `apps/api/app/schemas/task.py` with the new monitoring field, and updated `apps/api/tests/test_auth_wallet_tasks.py` to seed passed moderation events and lock the new payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes AI moderation outcome rates without regressing the existing admin rollups.

Round 56

added AI moderation hit summaries to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing recent blocked moderation events by stage and flag through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/tasks.py` to aggregate blocked `planner` and `reviewer` task events into `ai_moderation_hits_24h_by_stage` and `ai_moderation_hits_24h_by_flag`, updated `apps/api/app/schemas/task.py` with the new monitoring fields, and updated `apps/api/tests/test_auth_wallet_tasks.py` to seed blocked moderation events and lock the new payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes AI moderation hit summaries without regressing the existing admin rollups.

Round 55

added AI eval inventory to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to defining a baseline in-repo eval dataset registry and surfacing it through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/services/gpt_workflow.py` with a versioned `EVAL_DATASET_REGISTRY`, updated `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `ai_eval_inventory` with eval set ID, version, stage, case count, and focus areas, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the new monitoring payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes the AI eval inventory without regressing the existing admin rollups.

Round 54

added AI moderation inventory to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing the local moderation ruleset and category coverage through the existing admin monitoring overview.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `ai_moderation_inventory` with moderation category, ruleset version, and pattern count, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the new monitoring payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes the AI moderation inventory without regressing the existing admin rollups.

Round 53

added local moderation checks to GPT planning and review.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to adding a repo-local moderation and output-safety filter around the existing GPT planning and review workflow.

这轮变更

extended `apps/api/app/services/gpt_workflow.py` so planning and review now apply versioned local moderation rules to both request inputs and model outputs, return `moderation_version`, `moderation_status`, and `moderation_flags`, and block flagged content with safe fallback results; updated `apps/api/tests/test_gpt_workflow.py` to lock the new moderation metadata and blocking behavior with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_gpt_workflow.py -q` passed with 6 tests, confirming the moderation hook blocks flagged inputs/outputs while preserving the existing prompt metadata contract.

Round 52

added AI prompt inventory to admin monitoring.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to surfacing the existing prompt registry and version metadata through the admin monitoring overview.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `ai_prompt_inventory` with `stage`, `prompt_id`, `prompt_version`, and configured model for the planning and review prompts, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the new monitoring payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes the AI prompt inventory without regressing the existing admin rollups.

Round 51

added prompt version tags to GPT planning and review.

visible

影响范围

AI-governance remediation from the V2.3 audit, limited to introducing a minimal prompt registry and version metadata for the existing planning and review prompts.

这轮变更

extended `apps/api/app/services/gpt_workflow.py` so planning and review results now carry `prompt_stage`, `prompt_id`, and `prompt_version` from a central prompt registry in both success and fallback paths, and added `apps/api/tests/test_gpt_workflow.py` to lock the new prompt metadata behavior with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_gpt_workflow.py -q` passed with 4 tests, confirming the GPT workflow now emits stable prompt version metadata for planning and review without changing the existing output contract.

Round 50

added a governance coverage summary to admin monitoring.

visible

影响范围

data-governance remediation from the V2.3 audit, limited to aggregating the current governance inventory into a compact coverage summary for admin review.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `data_governance_summary` with tracked-entity count, classification coverage, retention coverage, audit coverage, and entities without retention policy, and expanded `apps/api/tests/test_auth_wallet_tasks.py` to lock the new summary payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes a governance coverage summary without regressing the existing admin rollups.

Round 49

added a data classification inventory to admin monitoring.

visible

影响范围

data-governance remediation from the V2.3 audit, limited to surfacing a baseline data dictionary and classification view for the core retained security, support, audit, and operational entities.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `data_governance_inventory` with entity classification, retention days, and purpose for task events, auth sessions, password recovery requests, support tickets, and retention audit records, and expanded `apps/api/tests/test_auth_wallet_tasks.py` to lock the new governance inventory payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now exposes a baseline data governance inventory without regressing the existing admin rollups.

Round 48

added recent retention runs to admin monitoring.

visible

影响范围

data-governance remediation from the V2.3 audit, limited to surfacing recent retention execution records directly inside the existing admin monitoring overview.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `recent_retention_runs` with the latest retention execution IDs, request IDs, dry-run/confirm flags, deletion summaries, and timestamps, and expanded `apps/api/tests/test_auth_wallet_tasks.py` to seed retention executions and lock the new monitoring payload with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming retention execution history is now visible in the admin monitoring overview without regressing existing monitoring rollups.

Round 47

added admin retention history lookup.

visible

影响范围

data-governance remediation from the V2.3 audit, limited to making the persisted retention execution records visible through an admin read path.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/routes/admin.py` so `/api/admin/retention/history` now returns recent persisted retention execution records with request IDs, dry-run/confirm flags, and deletion summaries, and expanded `apps/api/tests/test_retention_cleanup.py` to lock the new history query with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_retention_cleanup.py -q` passed with 5 tests, confirming retention execution records can now be queried back in descending recency order without breaking the existing retention controls.

Round 46

added persisted retention execution records.

visible

影响范围

data-governance remediation from the V2.3 audit, limited to storing each retention cleanup or dry-run execution as a durable audit record instead of relying only on logs.

这轮变更

extended `apps/api/app/models.py`, `apps/api/app/schemas/task.py`, `apps/api/app/services/tasks.py`, and `apps/api/app/routes/admin.py` so each `/api/admin/retention/run` call now writes a `retention_cleanup_executions` record with admin user, request ID, dry-run/confirm flags, and deletion counts, returns its `audit_record_id`, and expanded `apps/api/tests/test_retention_cleanup.py` to lock the persisted audit path with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_retention_cleanup.py -q` passed with 4 tests, confirming retention runs now create durable execution records while preserving the existing delete, dry-run, confirmation, and audit-log behavior.

Round 45

added explicit confirmation for retention deletes.

visible

影响范围

data-governance remediation from the V2.3 audit, limited to preventing accidental destructive retention cleanup runs unless an admin explicitly confirms execution.

这轮变更

updated `apps/api/app/routes/admin.py` so `/api/admin/retention/run` now requires `confirm=true` for real deletes while still allowing `dry_run=true` previews, and expanded `apps/api/tests/test_retention_cleanup.py` to lock the destructive path, dry-run path, audit logging, and the new confirmation guard with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_retention_cleanup.py -q` passed with 4 tests, confirming unconfirmed delete attempts are rejected and retention-eligible data stays untouched until `confirm=true` is supplied.

Round 44

added retention cleanup audit logs.

visible

影响范围

data-governance remediation from the V2.3 audit, limited to recording structured audit logs whenever an admin runs retention cleanup or its dry-run preview.

这轮变更

updated `apps/api/app/routes/admin.py` so `/api/admin/retention/run` logs `admin_retention_cleanup_run` with the admin user, request ID, dry-run flag, and deleted-count summary, and expanded `apps/api/tests/test_retention_cleanup.py` to lock the new audit-log output with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_retention_cleanup.py -q` passed with 3 tests, confirming retention cleanup still works and now emits the expected structured audit log.

Round 43

added a retention dry-run preview mode.

visible

影响范围

data-governance remediation from the V2.3 audit, limited to making admin retention cleanup previewable before it performs destructive deletes.

这轮变更

extended `apps/api/app/schemas/task.py`, `apps/api/app/services/tasks.py`, and `apps/api/app/routes/admin.py` so `/api/admin/retention/run?dry_run=true` returns the same retention policy and deletion counts without deleting records, and expanded `apps/api/tests/test_retention_cleanup.py` to lock both destructive and dry-run behavior with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_retention_cleanup.py -q` passed with 2 tests, confirming dry-run returns cleanup counts while leaving the retention-eligible records untouched.

Round 42

added an admin retention cleanup endpoint.

visible

影响范围

data-governance remediation from the V2.3 audit, limited to turning the retention preview into an executable cleanup path for expired events, sessions, recovery requests, and closed support tickets.

这轮变更

extended `apps/api/app/schemas/task.py`, `apps/api/app/services/tasks.py`, and `apps/api/app/routes/admin.py` so `/api/admin/retention/run` now deletes records that exceed the configured retention windows and returns deleted counts, and added `apps/api/tests/test_retention_cleanup.py` to lock the cleanup path with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_retention_cleanup.py -q` passed with 1 test, confirming the admin retention cleanup path deletes retention-eligible records and reports the deleted counts.

Round 41

added a retention preview to admin monitoring.

visible

影响范围

data-governance remediation from the V2.3 audit, limited to surfacing retention policy windows and purge-eligible record counts inside the existing admin monitoring overview.

这轮变更

extended `apps/api/app/config.py`, `apps/api/app/schemas/task.py`, and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `retention_policy_days` and `retention_candidates`, and added `apps/api/tests/test_retention_preview.py` to lock task-event, auth-session, recovery-request, and support-ticket retention previews with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_retention_preview.py -q` passed with 1 test, confirming the monitoring overview now includes retention policy windows and purge-eligible record summaries.

Round 40

added 24h-vs-1h provider health trend deltas.

visible

影响范围

observability remediation from the V2.3 audit, limited to surfacing longer-window provider reliability, startup, and success-rate trend changes inside the existing admin monitoring overview.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `provider_health_trend_deltas`, and updated `apps/api/tests/test_auth_wallet_tasks.py` to lock the new 24h baseline vs 1h current-window provider health rollup with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now includes provider health trend deltas without breaking the existing admin rollups.

Round 39

moved smoke browser startup to system-browser CDP attach.

visible

影响范围

frontend smoke-gate remediation from the V2.3 audit, limited to bypassing Playwright's failing Chromium launcher on this Windows machine.

这轮变更

updated `apps/web/scripts/run-playwright-e2e.mjs` to detect a local Chrome/Edge binary, spawn it directly with a remote debugging port, and attempt `chromium.connectOverCDP()` instead of `browserType.launch()` for the smoke flow.

验证结果

`npm run test:e2e -- --project=chromium` now gets past the old `browserType.launch: spawn EPERM` failure and reaches a new boundary where the system browser never exposes its CDP endpoint in this environment, timing out on `http://127.0.0.1:9223/json/version`.

Round 38

added provider health delta summaries.

visible

影响范围

observability remediation from the V2.3 audit, limited to surfacing short-window provider reliability, startup, and success-rate changes inside the existing admin monitoring overview.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `provider_health_deltas`, and updated `apps/api/tests/test_auth_wallet_tasks.py` to seed older and newer `degraded-cloud` snapshots and lock the new health-delta rollup with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now includes provider health delta summaries without breaking the existing admin rollups.

Round 37

added retry backlog aging summaries by provider.

visible

影响范围

observability remediation from the V2.3 audit, limited to surfacing active retry backlog age by provider inside the existing admin monitoring overview.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `retry_backlog_age_by_provider`, and updated `apps/api/tests/test_auth_wallet_tasks.py` to seed an aged `runpod` retry backlog task and lock the new retry-aging rollup with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now includes retry backlog aging summaries by provider.

Round 36

added cleanup backlog aging summaries by provider.

visible

影响范围

observability remediation from the V2.3 audit, limited to surfacing active cancellation and cleanup backlog age by provider inside the existing admin monitoring overview.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `cleanup_backlog_age_by_provider`, and updated `apps/api/tests/test_auth_wallet_tasks.py` to seed aged `runpod` and `vastai` backlog tasks and lock the new backlog-aging rollup with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now includes cleanup backlog aging summaries by provider.

Round 35

added provider-specific cleanup failure reason summaries.

visible

影响范围

observability remediation from the V2.3 audit, limited to surfacing recent cleanup failures split by provider and reason inside the existing admin monitoring overview.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `cleanup_failures_24h_by_provider_reason`, and updated `apps/api/tests/test_auth_wallet_tasks.py` to seed `runpod` and `vastai` cleanup failures with distinct reasons and lock the new cleanup provider+reason rollup with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now includes provider-specific cleanup failure reason summaries.

Round 34

added provider-specific failed-task reason summaries.

visible

影响范围

observability remediation from the V2.3 audit, limited to surfacing recent failed-task reasons split by provider inside the existing admin monitoring overview.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `failed_tasks_24h_by_provider_reason`, and updated `apps/api/tests/test_auth_wallet_tasks.py` to seed `runpod` and `vastai` failures with distinct reasons and lock the new provider+reason rollup with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now includes provider-specific failed-task reason summaries.

Round 33

added repeated failed-task reason summaries to admin monitoring.

visible

影响范围

observability remediation from the V2.3 audit, limited to surfacing near-term failed-task reasons grouped by `Task.last_error` inside the existing admin monitoring overview.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `failed_tasks_24h_by_reason`, and updated `apps/api/tests/test_auth_wallet_tasks.py` to seed repeated failed tasks with the same error and lock the new failure-reason rollup with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now includes repeated failed-task reason summaries.

Round 32

added stale active run summaries by execution status.

visible

影响范围

observability remediation from the V2.3 audit, limited to surfacing stuck active runs grouped by `TaskRun.status` inside the existing admin monitoring overview.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `stale_active_runs_by_status`, and updated `apps/api/tests/test_auth_wallet_tasks.py` to seed stale `executing` and `cleaning_up` runs and lock the new status rollup with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now includes stale active-run summaries grouped by execution status.

Round 31

added provider cost drift summaries to admin monitoring.

visible

影响范围

observability remediation from the V2.3 audit, limited to surfacing 24-hour actual-versus-quoted provider cost drift inside the existing admin monitoring overview.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `provider_cost_drift_24h_by_provider`, and updated `apps/api/tests/test_auth_wallet_tasks.py` to seed a finalized task cost drift and lock the new rollup with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now includes provider cost drift summaries.

Round 30

added active run aging summaries to admin monitoring.

visible

影响范围

observability remediation from the V2.3 audit, limited to surfacing stale active runs and the oldest active run age inside the existing admin monitoring overview.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `oldest_active_run_age_seconds` and `stale_active_runs_by_provider`, and updated `apps/api/tests/test_auth_wallet_tasks.py` to seed a long-running active run and lock the new aging summaries with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now includes active run aging summaries.

Round 29

added provider degradation and cancellation backlog summaries.

visible

影响范围

observability remediation from the V2.3 audit, limited to aggregating degraded provider snapshots and open cancellation backlog counts inside the existing admin monitoring overview.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `degraded_providers` and `cancellation_backlog_by_provider`, and updated `apps/api/tests/test_auth_wallet_tasks.py` to seed a degraded provider snapshot plus an open cancelling task and lock both summaries with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now includes degraded-provider and cancellation-backlog summaries.

Round 28

added cleanup and retry trend summaries to admin monitoring.

visible

影响范围

observability remediation from the V2.3 audit, limited to aggregating recent cleanup-related warning/error events and retried-task counts by provider in the existing admin monitoring overview.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `cleanup_failures_24h_by_provider` and `retried_tasks_24h_by_provider`, and updated `apps/api/tests/test_auth_wallet_tasks.py` to seed retry and cleanup events and lock the new provider rollups with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now includes cleanup-failure and retried-task provider summaries.

Round 27

added 24-hour warning and failure trend summaries to admin monitoring.

visible

影响范围

observability remediation from the V2.3 audit, limited to aggregating recent warning/error stages and failed-task provider counts in the existing admin monitoring overview.

这轮变更

extended `apps/api/app/schemas/task.py` and `apps/api/app/services/tasks.py` so `/api/admin/monitoring/overview` now returns `warning_events_24h_by_stage` and `failed_tasks_24h_by_provider`, and added regression coverage in `apps/api/tests/test_auth_wallet_tasks.py` to lock the new summaries against seeded warning/error events and a recent failed task.

验证结果

`python -m pytest apps/api/tests/test_auth_wallet_tasks.py -q` passed with 7 tests, confirming the monitoring overview now includes 24-hour warning-stage and failed-provider trend summaries.

Round 26

added request-aware logs for provider adapter calls and cleanup paths.

visible

影响范围

observability remediation from the V2.3 audit, limited to structured tracing inside provider marketplace service calls and worker cleanup/failure branches.

这轮变更

instrumented `apps/api/app/services/provider_marketplace.py` so offer fetch, submit, status poll, cancel, cleanup, and result collection all emit structured logs with the active `request_id`, and updated `apps/worker/worker/scheduler.py` to log cleanup start, cleanup finish, cleanup failure, and attempt failure with the same request context; added `apps/worker/tests/test_worker_cleanup_observability.py` for cleanup-path regression coverage.

验证结果

`python -m pytest apps/worker/tests/test_worker_cleanup_observability.py apps/api/tests/test_worker_request_trace.py apps/api/tests/test_business_observability.py apps/api/tests/test_observability.py -q` passed with 6 tests, confirming adapter and cleanup-path logs now keep the same request ID across cancellation and provider cleanup.

Round 25

connected worker execution logs back to the original request ID.

visible

影响范围

observability remediation from the V2.3 audit, limited to persisting the task creation request ID and reusing it in worker execution and provider-dispatch logs.

这轮变更

added `request_id` storage on `Task` in `apps/api/app/models.py`, updated `apps/api/app/services/tasks.py` plus `apps/api/app/routes/tasks.py` so API task creation persists the inbound request ID, and instrumented `apps/worker/worker/scheduler.py` to bind that request ID back into the log context and emit structured worker lifecycle logs for task start, provider dispatch acceptance, result collection, and completion; added `apps/api/tests/test_worker_request_trace.py` for end-to-end regression coverage.

验证结果

`python -m pytest apps/api/tests/test_worker_request_trace.py apps/api/tests/test_business_observability.py apps/api/tests/test_observability.py -q` passed with 5 tests, confirming worker logs now carry the same request ID that entered at task creation.

Round 24

added request-aware logs for quotes, offers, and task creation.

visible

影响范围

observability remediation from the V2.3 audit, limited to carrying `request_id` into core provider and task business logs without changing worker execution or external monitoring.

这轮变更

added `apps/api/app/services/observability.py` for request-id context and structured API event logging, updated `apps/api/app/main.py` to bind request IDs into request context, and instrumented `apps/api/app/routes/providers.py` plus `apps/api/app/routes/tasks.py` so quote creation, provider offer listing, and task creation emit structured logs with the active `request_id`; added `apps/api/tests/test_business_observability.py` for regression coverage.

验证结果

`python -m pytest apps/api/tests/test_business_observability.py apps/api/tests/test_observability.py -q` passed with 4 tests, confirming provider and task logs now include the same request IDs seen at the API boundary.

Round 23

added API request IDs and structured error logging.

visible

影响范围

observability remediation from the V2.3 audit, limited to backend request correlation and unhandled-exception logging without adding external monitoring vendors.

这轮变更

updated `apps/api/app/main.py` to attach `X-Request-ID` to every response, preserve inbound request IDs when present, and return structured 500 responses with matching request IDs while logging JSON error records for unhandled exceptions; added `apps/api/tests/test_observability.py` to verify both request ID headers and structured error logs.

验证结果

`python -m pytest apps/api/tests/test_observability.py -q` passed with 2 tests, confirming request ID propagation and structured exception logging work.

Round 22

added a site-wide cookie consent banner.

visible

影响范围

legal and data-compliance remediation from the V2.3 audit, limited to a minimal site-wide cookie consent prompt with persistent user choice.

这轮变更

added `apps/web/src/components/cookie-consent-banner.tsx` to show accept-all and essential-only choices with links to `/privacy` and `/terms`, and mounted the banner globally from `apps/web/src/app/layout.tsx`.

验证结果

`npm run build` passed after the banner was added, confirming the site-wide consent UI compiles cleanly.

Round 21

added TOTP two-factor auth for login.

visible

影响范围

account security remediation from the V2.3 audit, limited to backend TOTP enrollment, enable/disable, and login verification without taking on frontend UI in the same round.

这轮变更

added TOTP config in `apps/api/app/config.py`, added user-level TOTP fields in `apps/api/app/models.py`, added two-factor setup/status/enable/disable schemas in `apps/api/app/schemas/auth.py`, implemented TOTP secret generation and verification in `apps/api/app/services/security.py`, updated `apps/api/app/routes/auth.py` so login enforces `totp_code` when enabled and added `/api/auth/2fa`, `/api/auth/2fa/setup`, `/api/auth/2fa/enable`, and `/api/auth/2fa/disable`, and covered the flow in `apps/api/tests/test_two_factor_auth.py`.

验证结果

`python -m pytest apps/api/tests/test_two_factor_auth.py apps/api/tests/test_refresh_token.py apps/api/tests/test_session_management.py -q` passed with 7 tests, confirming TOTP setup, enable, login enforcement, disable, and existing refresh/session behavior all work together.

Round 20

added session listing and revoke controls.

visible

影响范围

account security remediation from the V2.3 audit, limited to backend device-session management for refresh-token sessions without taking on 2FA in the same round.

这轮变更

added `AuthSession` in `apps/api/app/models.py`, added session read/revoke schemas in `apps/api/app/schemas/auth.py`, updated `apps/api/app/routes/auth.py` so register/login/refresh persist and rotate refresh sessions, added `/api/auth/sessions` and `/api/auth/sessions/{session_id}`, and covered listing, rotation, and revocation in `apps/api/tests/test_session_management.py`.

验证结果

`python -m pytest apps/api/tests/test_session_management.py apps/api/tests/test_refresh_token.py -q` passed with 5 tests, confirming sessions are listed, refresh rotation revokes the old session, and a revoked session can no longer refresh tokens.

Round 19

added account deletion with owned-data cleanup.

visible

影响范围

user data-rights remediation from the V2.3 audit, limited to a password-confirmed DSAR delete flow for the signed-in user's repo-owned account data.

这轮变更

added `DeleteAccountRequest` and `AccountDeletionAccepted` in `apps/api/app/schemas/auth.py`, implemented `/api/auth/delete-account` plus owned-data cleanup for wallet, ledger, tasks, events, support tickets, projects, and password-recovery rows in `apps/api/app/routes/auth.py`, and added `apps/api/tests/test_account_delete.py` to cover successful deletion, token invalidation, cleanup, and wrong-password rejection.

验证结果

`python -m pytest apps/api/tests/test_account_delete.py -q` passed with 2 tests, confirming the account is deleted, owned rows are removed, the old token stops working, and the delete endpoint rejects an invalid current password.

Round 18

added refresh tokens and a rotate endpoint.

visible

影响范围

account security remediation from the V2.3 audit, limited to adding refresh-token issuance and token rotation in the auth API without changing the frontend flow yet.

这轮变更

added refresh-token expiry config in `apps/api/app/config.py`, added signed refresh-token helpers in `apps/api/app/services/security.py`, extended `AuthResponse` plus a new `RefreshTokenRequest` in `apps/api/app/schemas/auth.py`, updated register/login in `apps/api/app/routes/auth.py` to return both access and refresh tokens, added `/api/auth/refresh`, and covered the flow in `apps/api/tests/test_refresh_token.py`.

验证结果

`python -m pytest apps/api/tests/test_refresh_token.py -q` passed with 3 tests, confirming register now returns a refresh token, refresh rotation issues a new auth pair, and access tokens are rejected at the refresh endpoint.

Round 17

bypassed Playwright Test workers with a direct smoke runner.

visible

影响范围

frontend smoke gate, limited to replacing the remaining `@playwright/test` worker-host execution path with a single-process Playwright browser script.

这轮变更

rewrote `apps/web/scripts/run-playwright-e2e.mjs` to execute the existing smoke flow directly with the `playwright` API after the repo-local API and web services are healthy, including support for `--project` and `--list`, instead of delegating to `@playwright/test/cli.js`.

验证结果

`npm run test:e2e -- --project=chromium` now gets through API startup, web build/start, and the full smoke runner bootstrap before failing later at `browserType.launch` with `spawn EPERM`, which narrows the remaining Windows blocker to Chromium process launch rather than Playwright test-worker orchestration.

Round 16

moved Playwright smoke orchestration into a repo-local runner.

visible

影响范围

frontend smoke gate, limited to bypassing Playwright's `webServer` service-launch path by starting the API and web app from a repo-managed Node script before the smoke test begins.

这轮变更

added `apps/web/scripts/run-playwright-e2e.mjs` to start the existing API and web wrappers, wait for `/api/health` and `/login`, then invoke `@playwright/test/cli.js` with `PLAYWRIGHT_REUSE_EXISTING_SERVER=1`, and updated `apps/web/package.json` so `test:e2e` uses that runner.

验证结果

`npm run test:e2e -- --project=chromium` now gets through API startup, web build/start, and test discovery before failing later at `playwright/lib/runner/processHost.js` with `spawn EPERM`, which narrows the remaining Windows blocker to Playwright's own worker-process fork.

Round 15

replaced the Playwright web server shell chain with a repo-local Node launcher.

visible

影响范围

frontend smoke gate, limited to the web-side Playwright `webServer` command that still used `npm run build && npm run start` through a shell on Windows.

这轮变更

added `apps/web/scripts/start-playwright-web.mjs` to run `next build` and `next start` sequentially via `process.execPath`, and updated `apps/web/playwright.config.ts` to use that wrapper instead of the shell-based `npm run build && npm run start` command.

验证结果

`npm run test:e2e -- --project=chromium` still fails immediately with `spawn EPERM`, which confirms the remaining Windows blocker is broader than the removed shell command chain.

Round 14

moved Next.js type-checking off child_process workers.

visible

影响范围

frontend release gate, limited to the Next.js TypeScript validation worker that was still failing with Windows `spawn EPERM` during production builds.

这轮变更

added `experimental.workerThreads = true` in `apps/web/next.config.ts` so Next.js runs its TypeScript validation worker through `worker_threads` instead of a spawned child process while keeping the single-worker build setting from the previous round.

验证结果

`npm run build` now passes end-to-end in `apps/web`, including `Running TypeScript`, `Collecting page data using 1 worker`, and static page generation.

Round 13

pinned Next.js build workers down to one process.

visible

影响范围

frontend release gate, limited to the repo-configurable Next.js worker count that was spawning 23 page-data workers on Windows.

这轮变更

added `experimental.cpus = 1` in `apps/web/next.config.ts` so Next.js uses a single worker for page-data collection instead of the previous multi-worker default.

验证结果

`npm run build` still fails at the existing TypeScript `spawn EPERM` stage, but `npx next build --experimental-build-mode compile` now reports `Collecting page data using 1 worker ...` before hitting the remaining Windows `spawn EPERM` child-process failure.

Round 12

fixed the last task-detail test fixture types so frontend TypeScript checking passes again.

visible

影响范围

frontend unit-test gate, limited to the remaining fixture typing mismatches inside `apps/web/src/app/tasks/[taskId]/page.test.tsx`.

这轮变更

added explicit fixture types for task, event, artifact, and detail objects in `apps/web/src/app/tasks/[taskId]/page.test.tsx`, then widened the shared test fixtures so nullable fields and array payloads stop inferring as `null`-only or `never[]`.

验证结果

`npx tsc --noEmit` now passes with no TypeScript errors in `apps/web`.

Round 11

fixed the Vitest matcher typing so frontend type-checking now only shows real test-data errors.

visible

影响范围

frontend unit-test gate, limited to the TypeScript wiring for `vitest` globals and `@testing-library/jest-dom` matchers.

这轮变更

added explicit `node`, `vitest/globals`, and `@testing-library/jest-dom` types in `apps/web/tsconfig.json` and created `apps/web/vitest.d.ts` to load the Vitest jest-dom matcher declarations during TypeScript checking.

验证结果

`npx tsc --noEmit` now clears the large batch of matcher-type failures and stops only on 3 remaining real fixture typing errors in `src/app/tasks/[taskId]/page.test.tsx`.

Round 10

added a self-service account data export endpoint.

visible

影响范围

user data-rights remediation from the V2.3 audit, limited to giving authenticated users a machine-readable export of their own account, wallet, ticket, and recovery-request data.

这轮变更

implemented `/api/auth/export` in `apps/api/app/routes/auth.py` to return the signed-in user's account snapshot, wallet balances, task list, support tickets, and password recovery records, and added `apps/api/tests/test_account_export.py` to verify both authenticated export access and anonymous rejection.

验证结果

`python -m pytest apps/api/tests/test_account_export.py -q` passed with 2 tests, confirming authenticated users can export their account snapshot and unauthenticated requests are denied.

Round 09

added a signed-in password change flow.

visible

影响范围

account security hardening from the V2.3 audit, limited to letting authenticated users replace their own password safely.

这轮变更

added `ChangePasswordRequest` and `PasswordChangeAccepted` in `apps/api/app/schemas/auth.py`, implemented `/api/auth/change-password` in `apps/api/app/routes/auth.py` with current-password, minimum-length, and non-reuse checks, and added `apps/api/tests/test_change_password.py` to verify both successful rotation and rejection of a wrong current password.

验证结果

`python -m pytest apps/api/tests/test_change_password.py -q` passed with 2 tests, confirming the old password stops working and the new password works immediately after the change.

Round 08

added rate limiting to the auth endpoints.

visible

影响范围

API security hardening from the V2.3 audit, limited to abuse protection on register, login, and password-recovery requests.

这轮变更

added an in-memory rate-limit service in `apps/api/app/services/rate_limit.py`, enforced per-client per-email request limits in `apps/api/app/routes/auth.py`, reset limiter state in `apps/api/tests/conftest.py`, and added `apps/api/tests/test_rate_limit.py` to lock the 429 and `Retry-After` behavior.

验证结果

`python -m pytest apps/api/tests/test_rate_limit.py -q` passed with 2 tests, confirming auth abuse throttling now returns HTTP 429 with a retry window.

Round 07

moved browser auth storage out of localStorage.

visible

影响范围

frontend authentication storage hardening from the V2.3 audit, limited to the token and cached user session persistence layer.

这轮变更

updated `apps/web/src/lib/api.ts` so auth tokens and cached user data are written to `sessionStorage`, legacy `localStorage` values are migrated once into the session store, and logout now clears both stores.

验证结果

`npm run build` still reaches the existing late Next.js TypeScript `spawn EPERM` blocker after compile, and this auth-storage refactor introduced no earlier build-stage errors.

Round 06

switched new password hashes to bcrypt without breaking old accounts.

visible

影响范围

authentication security baseline from the V2.3 audit, limited to the backend password hashing scheme and legacy-hash verification.

这轮变更

updated `apps/api/app/services/security.py` so new passwords are hashed with `bcrypt` while existing `pbkdf2_sha256` hashes remain valid, and added `apps/api/tests/test_security.py` to lock both behaviors with regression coverage.

验证结果

`python -m pytest apps/api/tests/test_security.py -q` passed with 2 tests, confirming bcrypt is now the default hash format and legacy pbkdf2 hashes still verify.

Round 05

removed the build-time Google Fonts dependency so the web app can compile offline.

visible

影响范围

web build reliability for the V2.3 test gate, limited to `next/font/google` blocking local builds and downstream smoke setup.

这轮变更

removed `next/font/google` usage from `apps/web/src/app/layout.tsx` and defined repo-local body and display font stacks via `--font-body` and `--font-display` in `apps/web/src/app/globals.css`.

验证结果

`npm run build` now compiles successfully instead of failing on Google Fonts fetches; the remaining build blocker has moved forward to a later Next.js TypeScript step that still ends with `spawn EPERM`.

Round 04

made the smoke config reusable with already running local services instead of always forcing Playwright to spawn them itself.

visible

影响范围

Playwright smoke runner setup, limited to the webServer launch path that still fails with `spawn EPERM` on this Windows machine.

这轮变更

added `apps/web/scripts/start-playwright-api.mjs` so the API can be launched through a repo-local Node wrapper, updated `apps/web/playwright.config.ts` to use that wrapper for the API server command, and made both webServer entries honor `PLAYWRIGHT_REUSE_EXISTING_SERVER=1` so local pre-started services can be reused instead of going through Playwright's failing process launcher.

验证结果

`npm run test:e2e -- --project=chromium` still fails before smoke execution because Playwright's own webServer launcher hits `spawn EPERM` when it attempts to start services itself; the repo now has a reusable-server path for the next verification round.

Round 03

fixed the smoke test homepage check so the brand link no longer collides with the footer email link.

visible

影响范围

Playwright smoke test stability, limited to the ambiguous homepage locator called out in the V2.3 gap audit.

这轮变更

narrowed the homepage brand assertion in `apps/web/tests/e2e/smoke.spec.ts` from a page-wide `/taskgpu/i` link lookup to a header-scoped brand home link check and added a single-match assertion.

验证结果

`npm run test:e2e -- --project=chromium` no longer hits the old ambiguous selector path in code, but this environment still fails earlier with a Playwright-level `spawn EPERM` before the smoke flow starts.

Round 02

fixed the Windows Vitest launcher so frontend tests reach real suite execution.

visible

影响范围

frontend unit-test gate, limited to the Windows Vitest startup and worker configuration path.

这轮变更

converted the preload module passed to `node --import` into a file URL in `apps/web/scripts/run-vitest.mjs`, switched the default Vitest config loader to `native`, pinned Vitest to a single-thread `threads` pool in `apps/web/vitest.config.mjs`, and synchronized the Windows `net use` compatibility patch back into Node's ESM `child_process` exports in `apps/web/scripts/vitest-windows-safe-realpath.mjs`.

验证结果

`npm test` now loads all 13 frontend test files instead of failing immediately at startup; the remaining blocker is `vite:esbuild` failing with `spawn EPERM` during test transforms in this Windows environment.

Round 01

added the first visible repo fix by landing baseline frontend security headers and keeping the site green.

visible

影响范围

frontend security baseline, starting with response headers in Next.js.

这轮变更

added `Content-Security-Policy`, `Referrer-Policy`, `X-Content-Type-Options`, `X-Frame-Options`, `Permissions-Policy`, `Cross-Origin-Opener-Policy`, and `Strict-Transport-Security` in `apps/web/next.config.ts`.

验证结果

`npm run build` passed after the change and `/progress` remains reachable.

执行状态

当前执行情况

这里显示本地处理流程的最新状态。即使你没有盯着后台,也能看到当前有没有继续推进。

queuedround 103

Round finished; next round queued

20 July 2026, 5:20 pm

状态详情

执行记录

v23-supervisor-status.md
# V23 Local Supervisor Status
Status: queued
Last updated: 2026-04-18 02:56:57 +10:00
Thread ID: 019d8fde-6272-7611-a9f7-ca751c91a75c
Round: 7133
Supervisor PID: 15020
Current worker PID: none
Next eligible at: immediate
Completion reason: Round finished; next round queued
Last started at: 2026-04-18T02:56:46.9490778+10:00

历史记录

最近处理快照

这里保留了最近的处理备注,方便你结合上面的最新记录,快速回看这段时间问题是怎么被一步步推进的。

2026-04-14-automation-progress-29.md

20 July 2026, 5:20 pm

archive
# 2026-04-14 Automation Progress 29
## This Run
This batch closed the last known customer-facing blank support fallbacks in the main authenticated product paths.
- previous batches had already added contextual support handoff for dashboard, task detail, account, FAQ billing, and several failure states
- but `tasks` overview, `wallet` overview fallback, and one billing overview branch could still degrade into a bare `/support`

2026-04-14-automation-progress-28.md

20 July 2026, 5:20 pm

archive
# 2026-04-14 Automation Progress 28
## This Run
This batch closed another customer-facing recovery gap in the support flow:
- previous batches had already added contextual support handoff for several failure states
- but some customers could still reach a blank `/support` entry even when the product already knew the current account page, current task, or FAQ billing context

2026-04-14-automation-progress-27.md

20 July 2026, 5:20 pm

archive
# 2026-04-14 Automation Progress 27
## This Run
This batch closed the next high-anxiety recovery gap on the customer account flow:
- previous batches had already added contextual support handoff for task detail, billing, wallet, dashboard, and tasks list failure states
- but the account center still dropped logged-in customers into a blank `/support` flow when account, wallet, and recent task data all failed to load

2026-04-14-automation-progress-26.md

20 July 2026, 5:20 pm

archive
# 2026-04-14 Automation Progress 26
## This Run
This batch closed the next customer-facing integrity gap on the main recovery path:
- previous batches had already fixed task detail, billing, wallet, and task-attention support handoff
- but two high-traffic entry points still dropped customers into a blank support form when the whole page failed to load:

2026-04-14-automation-progress-25.md

20 July 2026, 5:20 pm

archive
# 2026-04-14 Automation Progress 25
## This Run
This batch closed the next high-value integrity gap on the money path:
- previous batches had already made task detail, billing, dashboard, and tasks list carry task context into support
- but wallet still had two inconsistent routes:

2026-04-14-automation-progress-24.md

20 July 2026, 5:20 pm

archive
# 2026-04-14 Automation Progress 24
## This Run
This batch closed the next highest-value gap still left on the logged-in customer recovery path:
- previous batches already made task detail and billing carry task context into support
- but the customer could still hit blank support entry from the dashboard and task list, which are the two most likely places people reach when they feel something is stuck