feat(parser): support multiple tables in a single markdown document

- Add extract_table_blocks() to split a document into contiguous table
  blocks, ignoring prose, headings, and blank lines between them
- Add parse_document() as the new top-level entry point that runs
  extract_table_blocks + detect_has_duration_column + parse_table per
  block and returns a combined flat list of rows
- Guard against empty End cells (e.g. in-progress rows) by validating
  the end field before calculating duration
- Update cli.py to use parse_document() instead of the manual
  detect + parse combo
- Add tests for extract_table_blocks and parse_document, including two
  smoke tests against the real 2026-W21 weekly timesheet file
This commit is contained in:
Jef Roosens 2026-05-22 10:17:17 +02:00
parent 7bea08ddac
commit d6689a6c83
Signed by: Jef Roosens
GPG key ID: 119385BCAA005C21
4 changed files with 295 additions and 9 deletions

113
tests/2026 - W21.md Normal file
View file

@ -0,0 +1,113 @@
# Week of 2026-05-18 - Review
# Vrijdag - 2026-05-22
| Start | End | Project | Story | Note |
|-------|-------|----------|------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|
| 08:15 | 09:30 | rate | [PBI 34976: refactor(rest): migrate manual entry, manual entry form and prototype handlers to OpenAPI 3.0](:/76f097bbb7854fd086e41ebc9132898f) | rebase |
| 09:30 | 09:45 | bugs | [Bug 35232: Biiiig asset tree import is slow](:/9e12b149a19b4c789b02479d7e3412bc) | review |
| 09:45 | 09:55 | scrum | | daily standup |
| 09:55 | | bugs | [Bug 35232: Biiiig asset tree import is slow](:/9e12b149a19b4c789b02479d7e3412bc) | review |
| 16:00 | 16:30 | internal | | Growth Path 2.0 |
| 16:30 | 17:30 | internal | | Factry Flow |
- [ ] Triage [Inbox](:/3a994fed3dc746a59d71c9f7ab1f60bc)
- [x] Process `distill` tags
- [ ] Process `refine` tags
- [ ] Refine [2026-05-26 - Sprint Retro](:/49951990900947438b80007b2d21b228)
- [ ] re-review [Bug 35232: Biiiig asset tree import is slow](:/9e12b149a19b4c789b02479d7e3412bc)
ge moogtr de big REST API MR rebasen op develop, good luck, `git rebase --onto origin/develop -i 027b7cc3b`, er staan paar fixup commits klaar al
# Donderdag - 2026-05-21
| Start | End | Project | Story | Note |
|-------|-------|---------|------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|
| 08:15 | 08:20 | office | | koffie |
| 08:20 | 09:35 | bugs | Bug 35326: OpenAPI: query parameters should be case-insensitive (canonical = lowercase) | review |
| 09:35 | 09:45 | hatch | [PBI 35098: SPIKE: Gitlab MR previews apps](:/eb90c72a90e746d8b535dda26e8e7275) | |
| 09:45 | 10:00 | scrum | | daily standup |
| 10:00 | 10:20 | hatch | [PBI 35098: SPIKE: Gitlab MR previews apps](:/eb90c72a90e746d8b535dda26e8e7275) | |
| 10:20 | 10:50 | refine | PBI 35330: Calculation script errors should not be in Sentry? Or add a tag we can filter by? | |
| 10:50 | 11:15 | product | | Claude code CLI |
| 11:15 | 12:05 | refine | PBI 35330: Calculation script errors should not be in Sentry? Or add a tag we can filter by? | |
| 12:45 | 13:40 | bugs | | review race bugs MR |
| 13:40 | 14:30 | bugs | [Bug 35232: Biiiig asset tree import is slow](:/9e12b149a19b4c789b02479d7e3412bc) | review |
| 14:30 | 15:00 | bugs | Bug 35331: Clients hitting sql max open connections | |
| 15:00 | 15:25 | refine | PBI 35330: Calculation script errors should not be in Sentry? Or add a tag we can filter by? | respond to comments |
| 15:25 | 15:30 | bugs | Bug 35331: Clients hitting sql max open connections | |
| 15:30 | 16:30 | rate | [PBI 34976: refactor(rest): migrate manual entry, manual entry form and prototype handlers to OpenAPI 3.0](:/76f097bbb7854fd086e41ebc9132898f) | respond to comments |
- [ ] Uitzoeken hoeveel audit log info er verloren is gegaan door de REST api migratie (`GetDatabase` -> `GetDatabaseByOrganizationUUID`)
- [ ] kijken of GetEvents property value filter nu broken is met datasource door remodelling in openapi spec
# Woensdag - 2026-05-20
| Start | End | Project | Story | Note |
|-------|-------|---------|------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|
| 08:15 | 08:25 | office | | koffie, sleutels zoeken |
| 08:25 | 09:00 | bugs | Bug 34948: Bulk measurement update returns 500 on failed validation | |
| 09:00 | 09:15 | bugs | Bug 35238: DestroySink does not listen to the 'force' query-parameter | |
| 09:15 | 09:50 | bugs | | CPU usage spikes in statistics collection |
| 09:50 | 10:00 | bugs | Bug 35241: OpenAPI: timeseries query result schema breaks JSON round-trip for scalar values, arrays, and string tags | review |
| 10:00 | 10:30 | bugs | Bug 35238: DestroySink does not listen to the 'force' query-parameter | |
| 10:30 | 12:00 | rate | [PBI 34976: refactor(rest): migrate manual entry, manual entry form and prototype handlers to OpenAPI 3.0](:/76f097bbb7854fd086e41ebc9132898f) | |
| 12:40 | 13:30 | rate | [PBI 34976: refactor(rest): migrate manual entry, manual entry form and prototype handlers to OpenAPI 3.0](:/76f097bbb7854fd086e41ebc9132898f) | trying to remove the wrapper |
| 13:30 | 13:45 | bugs | Bug 34948: Bulk measurement update returns 500 on failed validation | respond to comments |
| 13:45 | 14:45 | rate | [PBI 34976: refactor(rest): migrate manual entry, manual entry form and prototype handlers to OpenAPI 3.0](:/76f097bbb7854fd086e41ebc9132898f) | trying to remove the wrapper |
| 14:45 | 15:00 | bugs | Bug 34948: Bulk measurement update returns 500 on failed validation | respond to comments |
| 15:00 | 15:15 | bugs | Bug 35238: DestroySink does not listen to the 'force' query-parameter | respond to comments |
| 15:15 | 15:25 | hatch | [PBI 35098: SPIKE: Gitlab MR previews apps](:/eb90c72a90e746d8b535dda26e8e7275) | |
| 15:25 | 15:45 | bugs | Bug 35326: OpenAPI: query parameters should be case-insensitive (canonical = lowercase) | review |
| 15:45 | 16:00 | product | | CI Evelien fixen |
| 16:00 | 16:20 | bugs | Bug 35326: OpenAPI: query parameters should be case-insensitive (canonical = lowercase) | review |
| 16:20 | 17:00 | hatch | [PBI 35098: SPIKE: Gitlab MR previews apps](:/eb90c72a90e746d8b535dda26e8e7275) | |
- [x] fix CPU usage spikes in statistics collection ([thread](https://factrylabs.slack.com/archives/C01TD6M694G/p1779112687422719))
* idee: maak een global statistics variable aan, guarded met een mutex en getters/setters
* hou bij hoe oud die is, if too old -> recollect, anders geef gwn de cached versie mee
* dan gebeurt collection 1 keer en gebruiken alle loops gwn the same data
# Dinsdag - 2026-05-19
| Start | End | Project | Story | Note |
|-------|-------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|
| 08:10 | 08:15 | office | | coffee |
| 08:15 | 09:45 | rate | [PBI 34974: refactor(rest): migrate collectors, sinks, forwarders, tasks and related handlers to OpenAPI 3.0](:/9b4d4a0384be4ec3b1bbbcab68640721) | respond to comments |
| 09:45 | 09:55 | scrum | | daily standup |
| 09:55 | 10:30 | rate | [PBI 34974: refactor(rest): migrate collectors, sinks, forwarders, tasks and related handlers to OpenAPI 3.0](:/9b4d4a0384be4ec3b1bbbcab68640721) | rebase |
| 10:30 | 12:05 | rate | [PBI 34976: refactor(rest): migrate manual entry, manual entry form and prototype handlers to OpenAPI 3.0](:/76f097bbb7854fd086e41ebc9132898f) | fix tests |
| 12:55 | 13:05 | rate | [PBI 34976: refactor(rest): migrate manual entry, manual entry form and prototype handlers to OpenAPI 3.0](:/76f097bbb7854fd086e41ebc9132898f) | fix tests |
| 13:05 | 14:10 | bugs | [Bug 35232: Biiiig asset tree import is slow](:/9e12b149a19b4c789b02479d7e3412bc) | review |
| 14:10 | 14:45 | rate | [PBI 34974: refactor(rest): migrate collectors, sinks, forwarders, tasks and related handlers to OpenAPI 3.0](:/9b4d4a0384be4ec3b1bbbcab68640721) | final comments |
| 14:45 | 15:15 | rate | [PBI 34976: refactor(rest): migrate manual entry, manual entry form and prototype handlers to OpenAPI 3.0](:/76f097bbb7854fd086e41ebc9132898f) | fix tests |
| 15:15 | 15:45 | bugs | [Bug 35232: Biiiig asset tree import is slow](:/9e12b149a19b4c789b02479d7e3412bc) | review |
| 15:45 | 16:10 | rate | [PBI 34974: refactor(rest): migrate collectors, sinks, forwarders, tasks and related handlers to OpenAPI 3.0](:/9b4d4a0384be4ec3b1bbbcab68640721) | rebase |
| 16:10 | 16:30 | rate | [PBI 34976: refactor(rest): migrate manual entry, manual entry form and prototype handlers to OpenAPI 3.0](:/76f097bbb7854fd086e41ebc9132898f) | respond to duo review |
| 16:30 | 17:10 | bugs | Bug 34948: Bulk measurement update returns 500 on failed validation | |
# Maandag - 2026-05-18
| Start | End | Project | Story | Note |
|-------|-------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------|
| 08:10 | 08:15 | office | | coffee |
| 08:15 | 09:45 | rate | PBI 34972: refactor(rest): migrate events and event configuration handlers to OpenAPI 3.0 | respond to comments |
| 09:45 | 10:05 | scrum | | daily standup |
| 10:05 | 10:25 | rate | PBI 34972: refactor(rest): migrate events and event configuration handlers to OpenAPI 3.0 | respond to comments |
| 10:25 | 11:45 | rate | PBI 34974: refactor(rest): migrate collectors, sinks, forwarders, tasks and related handlers to OpenAPI 3.0 | fix tests |
| 11:45 | 12:05 | bugs | | review race bugs MR |
| 12:40 | 13:05 | bugs | | review race bugs MR |
| 13:05 | 13:40 | internal | | claude code proberen instellen |
| 13:40 | 13:55 | rate | PBI 34974: refactor(rest): migrate collectors, sinks, forwarders, tasks and related handlers to OpenAPI 3.0 | CI debugging |
| 13:55 | 14:50 | rate | PBI 34976: refactor(rest): migrate manual entry, manual entry form and prototype handlers to OpenAPI 3.0 | fix tests |
| 14:50 | 15:15 | refine | PBI 34321: Update asset from prototype: add 'Keep all' / 'Update all' bulk action buttons | |
| 15:30 | 15:35 | bugs | Bug 34916: GetAssets endpoint fails with "invalid escape \ sequence" when path filter contains backslashes | |
| 15:35 | 15:45 | refine | PBI 34321: Update asset from prototype: add 'Keep all' / 'Update all' bulk action buttons | |
| 15:45 | 17:00 | rate | [PBI 34974: refactor(rest): migrate collectors, sinks, forwarders, tasks and related handlers to OpenAPI 3.0](:/9b4d4a0384be4ec3b1bbbcab68640721) | respond to comments |
* laatste rest refactor MR nog afwerken
* gij hebt de 3 laatste op uw naam, dus gij kunt de wrapper uiteindelijk wegdoen
* moet nog verder opkuisen wa claude gedaan heeft
* nog wa testen da falen ook