feature(1100): Discover .markdown posts and always log run summary
Extend the anniversary matcher to recursively scan both .md and .markdown posts under _posts/blog, retaining the existing filename validation and relative-path dedupe identifier so published-state bookkeeping keeps working. Drop the zero-counter short-circuit in log_run_summary so the run_complete line is always emitted on a successful pass. Debug and manual runs now clearly show that scanning completed and found nothing instead of going silent. Update matching, logging, and run-logging tests to cover the new extension and always-emit contract, and refresh the logging architecture doc accordingly.
This commit is contained in:
@@ -56,7 +56,7 @@ Any matching key is replaced with the string `[REDACTED]`.
|
||||
| `configure_json_logging(level=INFO)` | First line of `main.main()`. Idempotent — clears existing handlers. | n/a | n/a |
|
||||
| `log_startup(**fields)` | After config load + `data_dir.mkdir`, before the pipeline pass. | `INFO` | `startup` |
|
||||
| `log_error(event, *, exc=None, **fields)` | When a pipeline attempt raises, or when the retry budget is exhausted. | `ERROR` | the supplied event name; `exc_type` added when `exc` is provided. |
|
||||
| `log_run_summary(scanned, matched, posted, skipped, posted_ids)` | Once per successful pass. **Silently skipped** when all counters are zero and no ids were posted. | `INFO` | `run_complete` |
|
||||
| `log_run_summary(scanned, matched, posted, skipped, posted_ids)` | Once per successful pass. Always emitted (including zero-counter passes) so debug and manual runs clearly show the scan completed. | `INFO` | `run_complete` |
|
||||
|
||||
## Startup payload
|
||||
|
||||
@@ -87,8 +87,9 @@ Each is added to the `startup` event payload under its own key.
|
||||
}
|
||||
```
|
||||
|
||||
A pass with no candidates emits **no line at all**, matching the
|
||||
"silent on no matches" contract.
|
||||
A pass with no candidates still emits a single `run_complete`
|
||||
summary line with all counters set to zero, so operators can confirm
|
||||
the scan ran and found nothing to publish.
|
||||
|
||||
# Examples
|
||||
|
||||
|
||||
Reference in New Issue
Block a user