Commit Graph

475 Commits

Author SHA1 Message Date
0c895cf416 feat(logging): unify canonical task CoT events 2026-08-24 17:00:17 +03:00
511219e3e0 fix(git): remove guided tour 2026-08-24 16:01:03 +03:00
fa4a75ce1e feat(frontend): unify Superset Tools visual system 2026-08-24 14:16:35 +03:00
1a5c14739e feat(auth): refresh login experience 2026-08-21 16:17:23 +03:00
ffa4d6a85b feat(scenarios): implement execution engine contracts 2026-08-21 16:15:40 +03:00
adbea9db18 fix(translate): fail-closed source handling, double insert, retry recount, scheduler races, LLM parse safety, and improved BI-analyst error UX 2026-08-20 17:34:39 +03:00
585a00c537 semantic-curation: fix anchors, metadata, and relations across backend + specs
- Replace legacy @PURPOSE with @BRIEF across 241 files
- Add missing [C:N] complexity tiers to function contracts in core modules
- Fix tombstone contracts: add @STATUS DEPRECATED to 5 deprecated anchors
- Resolve 7 unresolved @RELATION edges in executor.py (DictionaryManager, TranslationPreview, etc.)
- Fix flat hierarchical IDs in 4 test files (22 test functions)
- Fix invalid tags/relations in logger.py (@ADR, @CONSEQUENCES, DISABLED_BY)
- Rebuild semantic index: 9,576 contracts, 4,742 edges, 0 parse warnings
2026-08-20 11:45:15 +03:00
82a519a347 feat(scenarios): complete editor execution and analytics 2026-08-20 11:32:26 +03:00
e291ba757f fix(agent): full-catalog dashboard search and working LLM retry
- search_dashboards: call /api/dashboards with page_context=other and
  page_size=100 so the profile 'My Dashboards Only' filter can no longer
  hide the whole catalog; parse available_total/effective_profile_filter
  and report hidden-by-filter instead of a false 'no dashboards' answer
- prefetch_dashboards: same full-catalog context; fix dead code where
  data=resp.json() sat after return '' inside the error branch, making
  every 200 response raise NameError and the prefetch always return ''
- llm-status: ?force=1 bypasses the 30s health cache so the 'Retry now'
  button performs a fresh probe instead of re-reading the stale status;
  frontend keeps a single retry interval (previously stacked intervals
  decayed the countdown faster than 1/s and fired duplicate probes)
- tests: agent tool/prefetch, backend route bypass + force param,
  frontend retry/force coverage
2026-08-19 19:21:00 +03:00
dd9df0fc5e feat(env-widget): dashboard stats widget with per-env counts, health probe and profile-filter reference info
- Replace the global env <select> in TopNavbar with an expandable
  EnvironmentStatsWidget showing per-env total/mine/published/drafts
  and health status (latency, unreachable), preserving env switching.
- Add GET /api/environments/stats: per-env counts (profile-actor matched)
  + lightweight health probe, gathered concurrently with an 8s probe
  timeout and a process-local TTL cache (30s, coalescing) so the full
  Superset dashboard catalog is not re-fetched on every dropdown open.
- Add available_total to GET /api/dashboards so grids can show how many
  dashboards exist when the profile-default filter hides everything.
- Share ProfileFilterBanner across the dashboards hub and validation
  task form: 'showing X of Y' reference info + explicit Show all /
  Restore filter actions.
- Russian plural forms for dashboard counts (pluralRu helper) and
  compact 'Опубл.' label; i18n keys en/ru.
- Ignore :memory:test_* SQLite test artifacts and drop them from the index.
- Tests: env stats endpoint (incl. caching), widget, model fallback,
  plural helper, api client, integration.
2026-08-19 14:40:14 +03:00
a571ff8175 fix(search): global search queries with envId and bypasses profile filter
- handleSearchInput now receives the selected envId, so the debounced
  search actually fires API requests instead of hitting the !envId guard
  and clearing results immediately.
- The dashboard section of the global search sends page_context=other,
  apply_profile_default=false, override_show_all=true (same pattern as
  DashboardHubModel.loadDashboardSearchOptions), so the "show only my
  dashboards" profile filter no longer zeroes out dashboards that lack
  owner metadata.
- Updated unit tests: debounce now asserts API calls + profile-off flags.
2026-08-19 11:00:33 +03:00
81ba94684f feat: sed-мутации датасетов, правки миграции и фиксы
- Dataset viewer: sed-замена (find→replace) по всем/выбранным/текущим датасетам
  с обязательным визуальным предпросмотром и целями (sql/metrics/yaml); сохранение
  и выбор именованных правил (sedRules store + SedRuleEditor).
- Migration: literal-замена в dataset YAML при переносе; рескан ID чартов/датасетов
  перед миграцией + метрика средней длительности синка (GET /migration/sync-stats);
  логическая группировка опций (маппинги БД, сервер изменений, rescan) под галочками.
- Fix: дашборды хаба скрывались дефолтным профиль-фильтром show_only_slug_dashboards=true
  (теперь false); мастер миграции не грузил дашборды предзаполненного источника;
  потеря терминального task_status из-за утечки pending-корутин в /ws/logs (панель
  результата не появлялась); горизонтальный скролл в MappingTable; чистая per-env
  ошибка в mapping coverage.
- Backend: record_sync_duration + alembic-миграция sync-duration; literal_replace модуль.
2026-08-19 10:29:28 +03:00
ea05a42c81 fix frontend environment fallbacks and remove deprecated code 2026-08-17 15:08:34 +03:00
c32b7ef509 feat(translate): extend run metrics with observed flow stats; test hardening
- backend: aggregate cache_hits/observed_runs/source_records_read/eligible/
  translated/same_language_skipped/insert_rows_* preserving NULL for
  historical runs; drop legacy translate plugin module
- frontend: history page metric cards + RunOutcomeCompact per-run summary,
  totals with observed-scope notice; tabular numbers
- tests: fix banner date-format expectations, api-key env-scope fixture,
  rate-limiter cache pollution pinning, chart/candidates guards
- specs: sync dashboard-testing openapi contract
2026-08-13 08:23:43 +03:00
6336de9c24 fix(translate): correct preview responses and target DB selection 2026-08-11 12:34:00 +03:00
e52c5777ba feat(maintenance): fan out API starts to prod 2026-08-10 15:56:03 +03:00
9450559da5 feat(maintenance): improve event history and templates 2026-08-10 15:05:20 +03:00
db255ea4e6 feat(maintenance): ui/ux audit improvements for BI analyst persona
- read-only access to /maintenance for analysts (sidebar + hidden management)
- hub badge: message tooltip, link to events, accessible aria-label, localized end
- keep hub badge fresh via shared maintenance WS (init on dashboards page)
- events table: message column, auto-end indicator, localized statuses
- confirm dialog before starting maintenance with affected-dashboards summary
- surface load errors inline; localize store toasts
- auto-end discoverability hints in form and table
- form: multiple tables, end>start validation, timezone note
- status colors: active -> warning; completed tab dashboards expandable
- settings: timezone select, fieldset, localized units/aria labels
- backend: expose auto_end in event items, message in banner states
2026-08-10 12:04:43 +03:00
512e9223e3 feat(maintenance): configurable date format for banner timestamps 2026-08-10 11:22:48 +03:00
71a76cc784 fix(git): address dashboards by stable slug, hide git actions for slugless dashboards 2026-08-10 11:22:41 +03:00
3421484347 chore: synchronize remaining workspace updates 2026-08-10 07:29:08 +03:00
1c577e8561 docs(semantics): normalize code contracts 2026-08-10 07:28:05 +03:00
869997554e fix(frontend): use /content endpoint for draft download 2026-08-07 16:53:15 +07:00
38e5f31eca feat(041): fleet-report panel + close H2 (T047 UI + tests)
Code-review H2: markDeprecated/recordMigration/loadFleetReport had no tests and
loadFleetReport was dead code (not bound to UI). Close it.

- api/lineage.ts: add getFanoutReport(planId) -> GET /lineage/fanout/{plan}/report
- types/lineage.ts: add optional run_status to FleetReportDTO (backend returns it)
- Datasets.LineageModel.loadFleetReport: use lineageApi.getFanoutReport (typed)
- LineagePanel: new 'Fan-out report' section (plan id input + load button +
  per-dashboard status/unresolved-impact rendering), bound to model.loadFleetReport
- i18n: en/ru lineage.json add fleet_report_title, load_fleet_report, plan

Verification: Datasets.LineageModel.test.ts 6 passed (3 new: markDeprecated,
recordMigration, loadFleetReport incl. error path), lineage_panel 4 passed,
vite build OK, eslint clean.
2026-08-07 16:29:47 +07:00
c162f6ee3a chore(036-041): final validation reconciliation + 039 dashboard verification binding
- 038/039/040/041 validation.md: update PASS status to reflect completed
  runtime closure (T057-T059, T054-T057, T075-T079, T045-T048); regenerate
  039/040/041 digest tables; 039 T058 documented as the sole open task
- frontend/src/routes/dashboards/[id]/+page.svelte: include the 039 T057
  VerificationHistoryList binding (was created in the 039 commit but the
  page-level wiring was left unstaged)

All closure tasks across 036-041 are now complete except 039 T058 (blocked:
no repository_id in dashboard metadata; no PREPROD deployment page).
2026-08-07 15:31:39 +07:00
0a445fb170 feat(041): lineage frontend blast-radius + deprecation + opt-in rationale (T045-T048)
Close the 041 frontend/opt-in gaps found in the audit: no /lineage UI existed
and lineage_index stayed opt-in without documented rationale.

T045 - bind the existing Datasets.LineagePanel (T031) onto /datasets/[id]
  (blast-radius dependents + stale_index notice); deleted my transient
  duplicate to respect component reuse.
T046 - DatasetsLineageModel.markDeprecated()/recordMigration() + LineagePanel
  deprecation lifecycle section (grace window, successor, migration uuid);
  consumes existing api/lineage.ts + lineage.json i18n keys.
T047 - DatasetsLineageModel.loadFleetReport() for fan-out fleet report.
T048 - config_models.py: lineage_index_enabled default stays FALSE with an
  explicit rationale (post-sync Superset detail-call cost; flip after live
  indexer stability proof); consumers treat disabled index as empty read-model.

Verification: lineage + api vitest = 236 passed; vite build OK; eslint clean
for changed code (pre-existing ruff/require-each-key warnings untouched).
2026-08-07 15:27:24 +07:00
31d45a9d64 feat(039): REST scenario binding + verification pipeline views (T054-T057)
Close the 039 REST-binding and pipeline-view gaps found in the audit: the
scenario API client was never imported and pipeline views were not bound to
any page.

T054/T056 - dashboard-testing.ts gains compileScenario/validateScenario/
  resolveScenario (requestApi POST); WorkspaceModel.compileFromRest /
  validateFromRest / resolveFromRest give an agent-free REST preview path;
  DashboardScenarioWorkspaceModel.rest.test.ts (3 tests).
T055 - capture/vlm/disposition REST surface already landed on backend (038
  T057/T058); EvidencePanel autonomous binding deferred to follow.
T057 - DashboardDetailModel.loadVerificationRuns() + VerificationHistoryList
  bound on /dashboards/[id], consuming 037 T081 GET /verification/history;
  DashboardDetailModel.test.ts = 67 passed.

T058 (verify action) intentionally left open: VerificationRunRequest needs a
repository_id which dashboard metadata does not expose, and there is no
PREPROD deployment page in the frontend. Documented as a blocker in tasks.md.

Verification: 79 vitest passed (REST + detail model + api), vite build OK;
eslint clean for changed code (pre-existing URLSearchParams lint on old line
left untouched).
2026-08-07 15:15:01 +07:00
c1c35e5855 fix(scenario): route draft storage through StorageService with legacy fallback, persist run marker for post-restart recovery 2026-08-07 10:24:32 +07:00
a5e69de5ea fix(scenario): complete save flow with auto-created repo, robust approval gate, idempotent auto-start 2026-08-07 01:56:36 +07:00
6705437acc refactor(agent): compact chat header, remove duplicated status info 2026-08-07 01:55:50 +07:00
fa35514285 chore(agent): remove redundant PRODUCTION banner from chat 2026-08-06 22:37:46 +07:00
9cb5717a78 fix(agent): auto-start scenario chat, robust HITL resume, strict service auth
- frontend: fix auto-start on dashboards->/agent navigation (undefined params
  ReferenceError), route initial connect through ConnectionManager with auto-retry,
  reset runModel on objectId change and failed recovery
- agent: fix closure-over-loop-variable bug in _inject_env_id_into_tools (env now
  resolved from request-local ContextVar; idempotent wrapping), make
  execute_dashboard_result.result_key optional, resilient checkpoint resume with
  ToolMessage repair + direct-tool fallback, remove dead fast-path, consolidate
  tool_call parsing in _tool_resolver, context-safe ContextVar resets
- backend: llm-config gated by strict service-only auth (no user-JWT fallback),
  tighten idempotent run reuse (dashboard/env/intent match + 6h staleness),
  terminal event transitions run.status to COMPLETED/FAILED/CANCELLED,
  null-safe metric parsing in dashboard query model
- run.sh/docker-compose: require SERVICE_JWT (random per-run secret) instead of
  public default
2026-08-06 18:26:50 +07:00
6d19ecf81a fix: harden feature security and e2e integrations 2026-08-06 13:47:28 +07:00
df837dbb73 feat: 039 complete — 18-step matrix, responsive, evidence a11y
- T018/T022: 18-step fixture renders without collapse; all 19 automation-status rows.
- T038: 1366px responsive assertion.
- T052/T053: evidence a11y (disposition focus order) + 3 findings distinct severities.
- 039-dashboard-scenario-ui now 0 open / 52 done.
- All three specs (041/040/039) fully closed.
2026-08-05 22:35:27 +07:00
9e71b2a38a feat: 039 fixtures + recovery + a11y; 040 a11y
- 039 T001: materialize 038 scenario fixtures into __fixtures__/dashboard-testing.
- 039 T011: WorkspaceModel.setDomainError recovery (permission/missing-env, no AgentRun).
- 039 T039 / 040 T068: a11y assertions (labeled inputs, ARIA progress strip).
- 039 open -> 6, 040 open -> 2.
2026-08-05 21:56:43 +07:00
f57d92739b feat: e2e tests for 039 scenario UI + 040 load testing
- 039 T040: dashboard-scenario-ui.e2e.js (entry v2 intent, missing-env, reload recovery).
- 040 T065: dashboard-load-testing.e2e.js (entry, matrix preview, stop/reconnect).
- Playwright chrome channel now available; all three prototypes browser-validated.
2026-08-05 21:53:30 +07:00
78042174e9 chore: 039 discovery-candidate test 2026-08-05 21:47:01 +07:00
90afb78a79 feat: 039 entry/lifecycle/preview tests + verification
- T006: DashboardHeader scenario entry tests (contextVersion=2, env missing, no stale id).
- T027: parameter resolution never restarts inspect.
- T034: preview/draft never marks persisted.
- T048: ArtifactPreview evidence/ branch + disposition summary.
- T041/T042/T043: SQL-language scan (clean), regressions, lint+build verified.
- 039 open down to 11 (browser-dependent + fixtures + recovery).
2026-08-05 21:46:39 +07:00
ab92459923 feat: 039 HITL -> 036 gate, discovery candidates, evidence tree branch
- T030: discovery-candidate flow (no direct approval/catalog mutation).
- T035/T036/T037: scenario save/baseline delegate to 036 pending gate via
  WorkspaceModel.requestDurableAction; deny/blank-reason covered.
- T049: ArtifactPreviewPanel evidence/ subtree + disposition summary.
- 23 tests green, build passes.
2026-08-05 21:42:24 +07:00
128871065d feat: 039 evidence + scenario summary/coverage views
- T007: DashboardDetailModel scenarioHref (contextVersion=2 + intent).
- T019: ScenarioSummary + ScenarioCoverage views (with StepTable/ProgressStrip).
- T045/T044: WorkspaceModel evidence[] + updateFindingDisposition + tests.
- T050: EvidencePanel wired into ScenarioWorkspace.
- T051: VlmProvenanceFooter component.
- 45 frontend tests green, build passes.
2026-08-05 21:34:24 +07:00
0d9f3e09f3 chore: close 041/040 tails — contract test, lifecycle test, fixtures, integration test
- 041 T038: 040 blast-radius consumer contract test (R6 pinned snapshot shape).
- 040 T003: materialize load-testing fixtures into frontend __fixtures__.
- 040 T029: run lifecycle test (ramp/steady/terminal immutability) + T038 aggregate-progress.
- 040 T051/T059: LoadResults + LoadComparison L2 UX tests.
- 040 T064: LoadModels integration test (profile -> gate -> run -> reconnect -> results).
- Check off verified tasks; remaining 040 open: e2e (T065), integration (T066/T067), a11y (T068).
2026-08-05 21:28:54 +07:00
9de74baa08 feat: dashboard testing suite — scenario UI, load testing, dataset lineage
- 039-dashboard-scenario-ui: agent workspace (WorkspaceModel, scenario
  views, parameters/baselines, artifact preview, HITL save/approval,
  evidence/VLM review, pipeline verification views) + contextVersion=2
  scenario intent + prototype.
- 040-dashboard-load-testing: capacity/matrix/profile, runner pool,
  timing, circuit breaker, PROD gate, cache/bounded/consistency,
  comparison/schedule, API + frontend + prototype.
- 041-dataset-lineage-blast-radius: usage index, severity/schema-diff,
  propagation, deprecation, fanout, API + frontend + prototype (R9
  labels/metrics/recreate).
- 036/037 amendments: dataset_updated trigger + fanout_plan_id, lineage
  deprecation gate, 040 read-model traceability.
- Includes pre-existing 042-rls-management-workspace and
  043-idm-account-integration work.
2026-08-05 18:15:30 +07:00
f9a15a0a7b feat(maintenance): opt-in auto-end at end_time via scheduler scan
Add auto_end flag to maintenance_events: when set with an end_time, a
60s APScheduler scan dispatches the end task automatically. The scan
survives restarts and is de-duped by task_id; end_time alone stays
informational. Includes alembic migration, route/schema wiring, Svelte
checkbox with validation, examples, and backend + frontend tests.
2026-08-04 16:38:20 +07:00
03684fd445 fix(maintenance): start idempotency returns real 409, not documented-but-200
The start endpoint declared 409 in OpenAPI responses but returned the
already_active idempotency hit as a plain 200. Now returns HTTP 409
Conflict with the declared MaintenanceAlreadyActiveResponse body
{maintenance_id, status: 'already_active'}.

Consumers updated to treat 409 already_active as idempotent success:
- bash example: 409 case in api_call
- python example: 409 branch in start_maintenance
- frontend form: info toast instead of error

New test: TestStartIdempotency verifies 409 + body + no new task
dispatched (naive datetimes to match SQLite tz-stripping).
2026-08-04 11:57:41 +07:00
d54f903660 feat(maintenance): settings (timezone, height), snapshot restore, UX polish
Settings:
- display_timezone defaults to Europe/Moscow everywhere (model, service
  fallbacks, settings form); migration flips untouched 'UTC' default row.
- New banner_height setting (1-200 grid units, NULL = auto): threaded from
  settings through start/rebuild flows into MARKDOWN insert/content updates;
  settings panel gains Auto/Manual radio + number input.

Banner removal:
- update_dashboard_layout returns the pre-mutation position_json; stored on
  maintenance_dashboard_banners.original_position_json at creation.
- Removal restores the snapshot verbatim when the current layout matches the
  deterministic replay of the insert (normalize + y-shift + banner keys);
  diverged layouts (user edits during maintenance) and legacy banners fall
  back to surgical removal. Fixes layout drift from y-shift and unreverted
  ROOT->TABS -> ROOT->GRID normalization.

UX:
- StartMaintenanceForm: recent-tables chips from event history, Enter-to-
  submit, schema.table format hint, inline task progress panel (status +
  progress bar + task-log link), templates section removed, Button atoms.
- Maintenance page: environment selector + env context init.
- Events table: Active/Completed tabs with count badges.
- Backend: plugins/services report monotonic progress via
  context.logger.progress (per-dashboard) for start/end/end-all.

Tests: 203 backend (matcher, restore/fallback, height, progress) + 3645
frontend pass; migration E2E-verified (upgrade/downgrade).
2026-08-04 11:08:11 +07:00
a733bc15db feat(frontend): atomize page buttons on $lib/ui atoms (Tabs, Switch, Button variants)
- Add Tabs atom (underline/segmented/card/pills + per-tab badge, parent-controlled value+onchange) and Switch atom
- Add success/warning/info/link variants to Button (link skips size classes to avoid cn() class conflicts)
- Add onPageChange to Pagination for 1-based currentPage pages
- Convert ~86 raw <button> across 17 routes/*/+page.svelte to atoms; keep 14 base-conflicting controls (backdrop, chips, accordion rows, destructive-colored links/actions) raw with @REJECTED docs
- Refine audit manual-button rule: flag pages with raw buttons only when no $lib/ui import and no '@REJECTED Raw <button>' exception
- Refine hasDocumentedException regex to require the comment itself to document the raw control
2026-08-03 12:56:49 +07:00
bad819c92b feat(settings): add help tooltips to tunable settings fields
Show HelpTooltip (ⓘ) next to every variable configuration field in the
Settings UI explaining what the variable is and how it affects behavior:

- System tab: session timeouts, task retention, auth rate limit,
  assistant history retention, translation baseline (replaces broken
  hint prop on session inputs)
- Logging tab: agent log level, max file size, backup count, agent
  view, hide routine infra
- Environments tab: default environment selector
- Input atom gains optional helpText prop rendering the tooltip next
  to the label (reusable by other forms)
- 17 new i18n keys in en/ru with inline fallbacks
2026-08-03 12:44:55 +07:00
b7b752d4a8 fix(frontend): resolve Svelte 5 warnings in git components
- Wrap model constructor props in untrack() to silence state_referenced_locally
- Complete GitManager prop sync (dashboardId, dashboardTitle now kept in sync)
- Fix a11y issues: dialog/alertdialog tabindex, backdrop roles, label for/id
- Split multi-code svelte-ignore into single-code comments (Svelte 5.56 honors only the first)
- Rename legacy a11y-autofocus ignore; fix GitEnvironmentTimeline dead href link
- Remove unused relPath from audit-frontend-style.mjs
2026-08-03 10:30:21 +07:00
db527dca98 style(frontend): unify styling on semantic design tokens and drop legacy src/components zone
- Replace raw Tailwind colors, hex arbitrary values, inline color styles and
  undefined CSS vars with semantic tokens from tailwind.config.js across
  routes and lib/components (modal backdrops -> bg-surface-overlay, sky-* ->
  info family, dark log console -> terminal/log tokens, etc.)
- Rewrite unstyled AgentRunPanel/DraftArtifactList on $lib/ui atoms
  (Button/Badge) and align MarkdownRenderer fallbacks with the token palette
- Extend audit-frontend-style.mjs gate: missing palettes, hex-arbitrary,
  inline style color/var checks, routes/*.svelte + lib/components .ts scan;
  fix quadratic inline-style regex and duplicate bg-white rule
- Remove legacy src/components zone: $components aliases (svelte/vitest
  configs), LEGACY_COMPONENTS walk, stale prompt rules in .kilo/.agents
2026-08-03 10:29:04 +07:00
b87b9a22b4 fix(routes): migrate login page state to Svelte 5 runes
Replace plain let bindings with $state() runes in login form state;
ignore GitService runtime repos (backend/git_repos) in .gitignore.
2026-08-02 23:54:13 +07:00