gnodet opened a new issue, #13566:
URL: https://github.com/apache/maven/issues/13566

   ## Problem
   
   `build-report.json` is only written at session end via 
`BuildReportCollector.onSessionEnded()`.
   If the build crashes (OOM, kill -9, uncaught exception that bypasses 
EventSpy), the
   report is lost — including all the diagnostic and timing data collected up 
to that point.
   
   ## Proposed fix
   
   Register a JVM shutdown hook in `BuildReportCollector` that writes a partial 
report
   with whatever data has been collected so far. The report should include a
   `"status": "CRASHED"` or `"partial": true` field so consumers know it's 
incomplete.
   
   The normal `onSessionEnded()` path should deregister the shutdown hook to 
avoid
   double-writing.
   
   Note: `kill -9` cannot be intercepted by shutdown hooks. This covers OOM, 
normal
   signals, and uncaught exceptions.
   
   ## Priority
   
   Low — nice-to-have resilience improvement. The normal path works fine.
   
   ## Related
   
   - #12695 — Build report PR
   - #12571 — Build output overhaul tracking issue
   
   <!-- AI-Agent-Disclosure -->
   > 🤖 Drafted with Claude Code (Claude Opus 4.6). Reviewed and confirmed by 
@gnodet before submission.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to