forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to service/tests/test_report_capability.pyClear filter

2026-09-22

fix(report): drop ReportSchool.slug; school identity is the uuidAhmet Kaan Gümüş · a79354b
fix(report): drop ReportSchool.slug; school identity is the uuid

The backend no longer sends slug on the report-school payload. A stray slug key is ignored, and docs plus ZEKA_SCHOOLS examples name the hyphenated school uuid.

2026-09-18

fix(report): label the Sube cells with class names, never raw idsAhmet Kaan Gümüş · 440bab7
fix(report): label the Sube cells with class names, never raw ids

The live school report printed `01a0b1a6-...` in every Sube cell: the
summaries carry class IDS and the document had nothing else to print. The
backend now sends the school's class list as a sibling key
(`classes: [{id, name}]`, `all_classes`), so the document prints the name a
manager recognizes.

- report package: `StaffBundle.class_names` (id -> display name) threaded
  through `load_staff_bundle` / `load_bundle`; `build._class_labels` maps the
  ids, and an unmapped id becomes `text.CLASS_LABEL_UNKNOWN`
  ("Adi bilinmeyen sube"), never the raw id. An absent map (older backend)
  uses the same label and still builds the document.
- identity vs label: the Sube x ders table still buckets by class IDENTITY
  (two classes whose label is the fallback cannot merge into one row) and
  sorts by the DISPLAY name; the overview's Sube count counts identities, so
  labelling never moves a number.
- handlers.report accepts `classes: [{id, name}]` (the backend's shape,
  preferred) and `class_names: {<id>: name}` as a fallback; a malformed list,
  or an entry with no usable id, is `bad_request`. The log line carries
  `sinif_adi_yok=<n>` so a missing or stale map is visible outside the
  document.
- capabilities: the pin flips -- the backend's constant (constant.rs:645),
  its dispatch and `POST /runs/{run_day}/report` all landed 2026-09-18, so
  `insight.report` joins BACKEND_CALLABLE_CAPABILITIES.
- docs: the label rule and the `classes` key in `## insight.report`,
  RAPORLAR.md rule 9 + limit 7, CIKTI-SOZLESMESI.md status line.
- tests: fixtures now carry class IDS plus a name map; they pin names over
  ids, name-order sorting, both payload shapes, the unmapped and the
  absent-map fallbacks, and the malformed-list refusal. Five of them fail
  pre-fix (stash probe).
feat(insight): serve the school report document as insight.reportAhmet Kaan Gümüş · 1d00d9d
feat(insight): serve the school report document as insight.report

The fourth served capability, and the only `insight.*` handler that reads
nothing over the bridge: the backend reads its own `zeka_*` rows and
dispatches them, and the service renders the school report from the payload
alone -- no store, no database (standing rule).

- capabilities: INSIGHT_REPORT plus the ReportRequest/ReportResponse
  contract. It stays OUT of BACKEND_CALLABLE_CAPABILITIES: the service side
  is ready, the backend's dispatch table has no sender for it yet. The tuple,
  the test pin and the `## insight.report` status line flip together.
- handlers.report: `kind` is `okul` (the other report types have no request
  contract and are refused by name); rows arrive as the backend's own row
  structs and are stamped with the frame's school -- a row claiming another
  school is refused, not overwritten; `run_day` comes from the request or the
  newest run row; the HTML rides in the response frame, capped at half the
  8 MiB frame limit.
- refusals are typed for the backend to map: bad_request, insufficient_rows,
  document_too_large, internal. Never a half-built, and never a truncated,
  document.
- docs: `## insight.report` contract table in BACKEND-GEREKSINIMLERI.md.
- tests: tests/test_report_capability.py drives the handler end to end with
  rows built by the production writers (no `school` key, exactly what the
  backend sends) and covers every refusal path; fails 6+6 pre-fix.