feat(report): emit markdown - #39
Merged
Merged
Conversation
Notes are hand-written markdown, and indenting every line behind a 📝 prefix turned bullets and bold into code blocks, so a shareable report had to be reassembled by hand. Same two queries, rendered as a period line, a project table and one section per session, with notes printed verbatim.
PeGa
added a commit
that referenced
this pull request
Sep 13, 2026
A-items settled: - A11: CONV-DEADKNOB added (every config key has a live reader). Stale REPORT_LIMIT references deleted, CHECKIN_INTERVAL added to exports. - A12: time-portability.sh added to acceptance oracle (MAIN.md test list, ARCH, BUILD-VERIFY, ACCEPT item 3). AGENTS.md updated: oracle references, build order (step 26), per-task format. - A13: test-authoring norms added to AGENTS.md §3b (capture-then-match, fixtures through app's gears, determinism by config-coarsening). Deferred #47 scope completed: - DM-CYCLE, CMD-CYCLE, CMD-PERIOD clauses added (cycle breaks are informational delimiters, not periods; period resolution uses id ranges). - PORT reads updated: list_cycles, list_sessions_by_id_range, get_project_totals_by_id_range, get_last_cycle_end, list_session_ids_by_project. - CORE-TEXT surface updated: notes_merge_trail, is_session_id, cycle_prefix, cycle_label, is_cycle_label, cycle_note_placeholder. - CMD-* sections updated: OFF (#36 fold), PAST (#51 validation, #36 fold, cycles subcommands, cycle-row truth), REPORT (markdown #39, cycle mode, exclusions), STATUS (#46 marker exclusion), CHECKIN (#35 desktop guard, five exits). - CONV-PORTABLE clarified: architectural discipline (all time operations through core/time.sh), not just GNU/BSD divergence. - [CRON] step-size guard documented (4c609f8). - START_HERE sync: three oracles, two-tier CONV-YES, CONV-DEADKNOB, BUILD-VERIFY, Done check. - Vocabulary fix: "id-window period views" → "the period listings". - App-debt markers added: #40 (CMD-CONFIG), #41 (CRON-STRIP), #42 (CONV-YES), #43 (CMD-ON), #44 (CONV-IDEMPOTENT-ENABLE), #28 (BUILD-VERIFY). - AGENTS.md: DM-DEAD grep comment-skip (^[^#]*).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
focus reportnow emits markdown on stdout. Same two queries, new renderer.Why
Notes are hand-written markdown — bullets,
**bold**,> blockquotes. The old layout indented every note line behind a seven-space📝prefix, which turned all of it into code blocks, so producing a shareable report meant reassembling the output by hand.Shape
Rules separate sessions from each other, so the last session isn't left with one dangling. An empty period stops after the period line rather than trailing a rule off a blank document.
Verified against real data
Rendering a 15-day window from a copy of the live DB and diffing the project table against an existing hand-assembled report: byte-identical rows, and all 25 of its sessions in identical order. The only differences were a session logged after that report was written, and the issue #36 duplicate row still present in the DB (
fyc/sesion-de-trabajoid 13, same start timestamp to the second as id 12) — data, not rendering.Notes
_reportis the only thing rewritten. Thetoday|week|month|customdispatch,wants_help,db_ensureandusage_errorare untouched;--helpstill exits 0 and bad arguments still exit 2.declare -A, so bash 3.2 still works (PORT-BASH32).core/text.sh notes_blockstays;offandpast liststill use it.CHECKs that project names contain no|.s/enow fall back to the stored string when a timestamp won't parse, matchingpast list— previously one unreadable timestamp aborted the whole report underset -e.13 new assertions covering the skeleton, both time-line forms, unindented note bullets, no dangling rule, and the empty-period case. audit clean, state-matrix 154/154, time-portability 20/20.