Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions specs/001-baseline/code-inventory.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

**Baseline spec**: [`spec.md`](spec.md)
**Package**: `nowo-tech/http-log-bundle`
**Last audited**: 2026-11-19 (concurrency, REQ-RUNTIME-003)
**Last audited**: 2026-11-22 (1.23-1.25 units: purge conflict, DDD host mapping, filter bar)

Maps **100%** of production files under `src/` (135 units; audit: `git ls-files src | wc -l` → 135). Test and demo trees are out of Packagist scope unless promoted in the spec.
Maps **100%** of production files under `src/` (140 units; audit: `git ls-files src | wc -l` → 140). Test and demo trees are out of Packagist scope unless promoted in the spec.

## Bundle entry

Expand Down Expand Up @@ -120,6 +120,7 @@ Maps **100%** of production files under `src/` (135 units; audit: `git ls-files
| `Resources/views/admin/index.html.twig` | List page | FR-ADM-001, FR-TWIG-001 |
| `Resources/views/admin/show.html.twig` | Detail page | FR-ADM-001, FR-TWIG-001 |
| `Resources/views/admin/_filter.html.twig` | Filter partial | FR-ADM-001, FR-TWIG-001, FR-CHR-001 |
| `Resources/views/admin/_filter_bar.html.twig` | UiKit filter bar of the list page (`web_ui.filter_actions: filter_bar`, 1.25) | FR-ADM-001, FR-TWIG-001, FR-UI-005 |
| `View/AdminPages.php` | Admin page view models (UiKit) | FR-UI-003, 004: FR-UIC-002 |
| `Resources/public/css/nowo-http-log-admin.css` | Admin payload stylesheet | FR-UI-003, 004: FR-UIC-001 |

Expand Down Expand Up @@ -241,6 +242,9 @@ Maps **100%** of production files under `src/` (135 units; audit: `git ls-files
| `Doctrine/ExactColumnsCollationListener.php` | Applies the exact collation to identifier columns of the entry table on MySQL / MariaDB | FR-DB-001 |
| `Doctrine/PathPrefixColumnListener.php` | Maps `path_prefix` and its index with `web_ui.filter_match: prefix` | FR-DB-002 |
| `Doctrine/UsageColumnsListener.php` | Maps the usage columns and indexes only when a usage channel is enabled | FR-DB-003 |
| `DependencyInjection/Compiler/EntityManagerMappings.php` | Reads DoctrineBundle's compiled definitions: which entity managers map the bundle entities and their connection (shared by the commit-tracking and entity-manager passes) | FR-DB-004, FR-CONC-003 |
| `DependencyInjection/Compiler/HttpLogEntityManagerPass.php` | 1.24: with `doctrine.entity_manager` set, the build fails unless that manager exists and is the only one mapping the bundle entities | FR-DB-004 |
| `Resources/config/doctrine/HttpLogEntry.orm.xml` | 1.24: XML twin of the `HttpLogEntry` attributes (`doctrine.mapping_type: xml` or a host that maps the entity itself) | FR-DB-004 |

## Admin list, export storage & access

Expand All @@ -259,6 +263,7 @@ Maps **100%** of production files under `src/` (135 units; audit: `git ls-files
| `Doctrine/LogWriteUnit.php` | Auto-commit, own transaction (runner, replays) or savepoint inside the host's transaction for every bundle write | FR-CONC-001 |
| `EventSubscriber/HttpLogConflictListener.php` | 409 / 503 + `CONFLICT_001` / `CONFLICT_002` for lock conflicts on the admin routes | FR-CONC-002 |
| `DependencyInjection/Compiler/HttpLogCommitTrackingPass.php` | Scopes the commit-tracking middleware to the bundle's connection, or reuses transaction-doctrine's ledger | FR-CONC-003 |
| `Doctrine/PurgeConflict.php` | 1.23: a purge that met a lock conflict after deleting rows is rethrown as `ConcurrencyConflict` with `committed: true` (CONFLICT_002), no middleware needed | FR-CONC-004 |

## Coverage summary

Expand All @@ -276,7 +281,7 @@ Maps **100%** of production files under `src/` (135 units; audit: `git ls-files
| CLI | 2 |
| Symfony config (`src/Resources/config/`) | 3 |
| Translations (`src/Resources/translations/`) | 7 |
| Twig views (`src/Resources/views/`) | 5 |
| Twig views (`src/Resources/views/`) | 6 |
| Outbound capture (HttpClient) | 10 |
| Mailer capture | 2 |
| Named inbound channels | 15 |
Expand All @@ -285,7 +290,7 @@ Maps **100%** of production files under `src/` (135 units; audit: `git ls-files
| Usage read API | 8 |
| Daily rollup | 6 |
| Privacy (GDPR) | 15 |
| Database exactness & optional mappings | 4 |
| Database exactness & optional mappings | 7 |
| Admin list, export storage & access | 5 |
| Concurrency | 3 |
| **Total** | **135** |
| Concurrency | 4 |
| **Total** | **140** |
3 changes: 3 additions & 0 deletions specs/001-baseline/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,11 @@ As a maintainer, I run the Symfony 8 FrankenPHP demo and CI smoke checks to veri
| FR-DB-001 | On MySQL / MariaDB the identifier columns of the entry table use a binary NO PAD collation so filters and indexes do not fold case, accents or trailing spaces |
| FR-DB-002 | With `web_ui.filter_match: prefix`, a `path_prefix` column and index are mapped; other hosts keep their schema |
| FR-DB-003 | Usage columns and indexes are mapped only when `outbound`, `mailer` or a named channel is enabled |
| FR-DB-004 | With `doctrine.mapping_type: xml` (or `doctrine.register_mapping: false` and a host that maps the entity itself) the entry mapping is the XML twin of the attributes (same table, columns, indexes); with `doctrine.entity_manager` set the container build fails unless that manager exists and is the only one mapping the bundle entities (1.24) |
| FR-ADM-002 | The admin list reads scalar projections and pages by keyset cursor (`?cursor=`) instead of `OFFSET` |
| FR-EXP-002 | Background exports are written to a private directory under random names, offered only to users allowed to export (and to the channels they may see), and deleted after `export.ttl_hours` |
| FR-UI-004 | When the access checker implements `HttpLogChannelAccessCheckerInterface`, list, entry, export and purge leave out denied channels (a denied entry gives the same 404 as a missing one) |
| FR-UI-005 | With `web_ui.filter_actions: filter_bar` the list page draws its filters as a UiKit filter bar (`_filter_bar.html.twig`, labelled rows plus the Filter / Clear actions) (1.25) |
| FR-SEC-001 | The container build fails when the admin UI is enabled without form CSRF protection |

### Concurrency (`FR-CONC-*`, REQ-RUNTIME-003, 1.22)
Expand All @@ -190,6 +192,7 @@ As a maintainer, I run the Symfony 8 FrankenPHP demo and CI smoke checks to veri
| FR-CONC-001 | Every bundle write runs in auto-commit, in one transaction of its own (multi-statement units, through transaction-doctrine's connection runner), or in a uniquely named savepoint inside the host's open transaction; a failed write never aborts the host's transaction, and a lost savepoint marks it rollback-only |
| FR-CONC-002 | A lock conflict on the bundle's admin routes answers 409 (or the configured 503) with `X-Conflict-Code: CONFLICT_001` and `Retry-After` when nothing was committed, `CONFLICT_002` without `Retry-After` otherwise; unique violations and lost connections are not mapped |
| FR-CONC-003 | Commit tracking for `CONFLICT_002` wraps only the connection of the default entity manager, or reuses transaction-doctrine's ledger when its `commit_detection` is on |
| FR-CONC-004 | A purge that meets a lock conflict after an earlier batch was deleted rethrows it as `ConcurrencyConflict` with `committed: true` (CONFLICT_002, no `Retry-After`); a conflict before any deletion and any other error are rethrown unchanged (1.23) |

### Internationalization (`FR-I18N-*`)

Expand Down
Loading