Skip to content

feat: structured logging via nova_jsonlogger tier1 + claude-try auto-request#10

Merged
Taure merged 1 commit into
mainfrom
feat/structured-logging-via-nova-jsonlogger-tier1
May 24, 2026
Merged

feat: structured logging via nova_jsonlogger tier1 + claude-try auto-request#10
Taure merged 1 commit into
mainfrom
feat/structured-logging-via-nova-jsonlogger-tier1

Conversation

@Taure

@Taure Taure commented May 24, 2026

Copy link
Copy Markdown
Owner

Summary

Combines three small but related changes since they all touch the logging or post-triage chain:

1. Revert io:format debug → structured ?LOG_*

triagebot_webhook_controller reverts the temporary io:format escape hatch (added in v0.1.7 to debug the webhook-secret mismatch when nova_jsonlogger silently dropped the diagnostic maps) back to structured ?LOG_ERROR / ?LOG_WARNING / ?LOG_INFO calls. The root cause is now fixed upstream — see #2.

2. Pin nova to the jsonlogger tier1 PR fork

Nova dep moves to Taure/nova at branch feat/jsonlogger-tier1 (the head of novaframework/nova#385). The tier1 jsonlogger:

  • Extracts class / reason / stacktrace meta into a structured error object per schema
  • Applies max_term_size and max_string_length caps so a gnarly stacktrace can't blow the log line
  • Adds schema presets (we pick ecs)

rebar.config carries a TODO to swap back to a tag once the upstream PR lands and a release is cut.

3. ECS schema + caps in prod_sys.config.src

Opts into the tier1 features:

formatter => {nova_jsonlogger, #{
    schema => ecs,
    map_depth => 3,
    term_depth => 50,
    max_term_size => 8192,
    max_string_length => 8192
}}

Also drops logger_level from debug back to info now that the debugging round is over.

4. Auto-request @claude implement when claude-try is applied

In triagebot_runner, after apply_labels succeeds, if claude-try is in the proposed label set, post a follow-up @claude please implement this issue per the triage above. Open a PR closing this issue when done. comment. The claude-code-action workflow in the target repo (Taure/gakudan/.github/workflows/claude.yml) already listens on @claude mentions, so this closes the loop without needing a maintainer to manually re-apply the label.

Test plan

  • rebar3 fmt --check
  • rebar3 xref
  • rebar3 dialyzer (clean)
  • rebar3 ct 20/20
  • After deploy: trigger a webhook on the gakudan repo and confirm a structured event: webhook_received line appears in Clever Cloud logs under the ECS schema (i.e. with @timestamp, log.level, message fields)
  • Force a verify_signature crash and confirm the error object renders with type / reason / stacktrace per ECS
  • Trigger a claude-try label proposal and confirm an @claude follow-up comment lands on the issue

…request

Three changes that go together:

1. Revert the io:format debug code in triagebot_webhook_controller back
   to structured ?LOG_ERROR / ?LOG_WARNING / ?LOG_INFO calls. The
   io:format escape hatch was added in v0.1.7 to debug the webhook
   secret mismatch when nova_jsonlogger was silently dropping the
   diagnostic maps - that root cause is now fixed upstream.

2. Pin nova to Taure/nova feat/jsonlogger-tier1 (the open PR
   novaframework/nova#385). The tier1 jsonlogger does structured
   error extraction from class/reason/stacktrace meta and applies
   term-size caps, so the stacktrace field that previously broke the
   formatter is now rendered safely. TODO comment in rebar.config
   to swap to a tag once the upstream PR lands.

3. Opt the prod config into the ECS schema with term and string caps
   (8192 bytes), plus drop logger_level back from debug to info now
   that the active debug round is over.

4. When triagebot's label_proposer asks for the claude-try label,
   post a follow-up @claude implement... comment so the
   claude-code-action workflow in the target repo picks it up
   without the maintainer needing to apply the label manually. The
   action listens on issues.labeled too, but an explicit @claude
   mention also makes the chain visible in the issue thread.
@github-actions

Copy link
Copy Markdown

🔴 Code Coverage — 14.5%

31 of 214 lines covered.


✅ ELP Lint

No diagnostics.

@Taure Taure merged commit 53306ea into main May 24, 2026
16 checks passed
@Taure Taure deleted the feat/structured-logging-via-nova-jsonlogger-tier1 branch May 24, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant