feat: structlog foundation + analysis pipeline instrumentation#33
Open
Nelson Spence (Fieldnote-Echo) wants to merge 1 commit intomainfrom
Open
feat: structlog foundation + analysis pipeline instrumentation#33Nelson Spence (Fieldnote-Echo) wants to merge 1 commit intomainfrom
Nelson Spence (Fieldnote-Echo) wants to merge 1 commit intomainfrom
Conversation
Phase 1 of structured logging integration. Adds structlog as core dependency and instruments the analysis pipeline at boundaries. - Add structlog>=24.0 to core dependencies - Create src/navi_sad/logging.py: configure_logging() with console (colored, dev) and JSON (production) modes. Bridges stdlib logging so existing logging.getLogger() calls emit structured output. - Update all 3 CLI scripts to use configure_logging() + structlog bound loggers. Add --json-logs flag to analysis scripts. - Instrument analysis pipeline boundaries (not hot loops): loader (artifact load, filter, reviewer votes), prep (series data, subset, baseline deviation, PE bundle), permutation (null start/complete for all three null types), recurrence (d matrix, head asymmetry), matching (length matching complete), selection (unanimous selection complete), eligibility (table built) - Add tests for configure_logging() modes and structlog event capture 411 tests + 4 new = 415. Lint, format, mypy clean.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Summary
Phase 1 of structured logging integration. Motivated by NIST submission on structural anomaly detection — external consumers need machine-parseable provenance, and we need real visibility into instrument behavior during calibration.
What's new
structlog>=24.0added as core dependency (zero transitive deps beyond stdlib)src/navi_sad/logging.py—configure_logging(json=False, level="INFO"). Console (colored) for dev, JSON lines for production/integration. Bridges stdlib so existinglogging.getLogger()calls route through structlog processors.--json-logsflag onpe_recurrence_null.pyandpe_confound_controls.pylogging.basicConfig()toconfigure_logging()Analysis pipeline instrumented at boundaries
loader.pyprep.pypermutation.pyrecurrence.pymatching.pyselection.pyeligibility.pyNo logging inside hot loops or pure computation functions.
Phase roadmap (in plan, not in this PR)
Test plan
🤖 Generated with Claude Code