ES /docs

job 10455 job_stopped_callback error - /var/app/current/vendor/bundle/ruby/3.3.0/gems/logger-1.6.6/l

Validation: d971e389-a359-4d46-9e42-7fb1e3c90ef6

Verdict: APPROVED#

Completeness#

Plan Item Status Evidence
lib/cupix/event.rb: wrap initialize, catch Errno::* / SystemCallError, warn + super(IO::NULL) fallback PASS lib/cupix/event.rb: added rescue SystemCallError => e after initialize body; rescue branch calls Cupix::Logger.warn(...), then super(IO::NULL), then re-applies self.formatter = Cupix::EventFormatter.new and `self.level = $CUPIX_LOGGER_LEVEL
app/models/concerns/eventable/events/base.rb: wrap Cupix::Event.publish in inner begin/rescue StandardError, Cupix::Logger.warn, do not re-raise; keep Cupix::EventService.publish_event outside inner rescue PASS app/models/concerns/eventable/events/base.rb: hunk lines 17-25 keep Cupix::EventService.publish_event([event]) on line 17 outside the new begin. Lines 18-25 wrap Cupix::Event.publish(event.serializable_hash(stringify_nested_fields: false)) in begin ... rescue StandardError => legacy_publish_err ... end that only calls Cupix::Logger.warn(...) (no re-raise). Outer rescue StandardError => e; raise e on the next context line is preserved but not entered by legacy-logger failures.
Out-of-scope: no changes to .ebextensions/003-filebeat.config, .platform/hooks/postdeploy/*.sh, no deletion of lib/cupix/event.rb, no new retry helper, no new tests PASS Diff touches only the two files above. No other paths appear.
bulkable_factory/annotation.rb explicitly out of scope (does not exist on master) PASS Not present in diff, consistent with plan.

Acceptance Criteria#

Criterion Status Evidence
lib/cupix/event.rb: Cupix::Event.instance no longer propagates open failure; falls back to IO::NULL logger PASS lib/cupix/event.rb: rescue SystemCallError => e handles Errno::* from super("#{Rails.root}/log/tesla_#{Rails.env}-event.log", 'daily'); body calls super(IO::NULL) so the Singleton.instance returns a usable Logger instead of raising.
app/models/concerns/eventable/events/base.rb: create_event does not trigger outer rescue when Cupix::Event.publish fails; model.event_created! is still called PASS (부분 검증 불가) Inner rescue in base.rb swallows StandardError before it reaches the outer rescue StandardError => e; raise e, so the outer rescue is not triggered — verifiable from diff. Whether model.event_created! is subsequently invoked depends on lines after the visible hunk (not shown); plan says the call was pre-existing and untouched. Cannot verify presence of the event_created! call from diff alone.
Cupix::EventService.publish_event failure still propagates as before (primary publish not silenced) PASS base.rb line 17: Cupix::EventService.publish_event([event]) remains outside the new inner begin block; any exception from it still hits the outer rescue StandardError => e; raise e, matching prior behavior.
ruby -c passes on both changed files PASS (검증 불가) Cannot run ruby -c from diff; visual inspection shows balanced begin/rescue/end in both files, proper string interpolation, keyword args, and terminating end. No syntactic anomaly visible.
grep -rn "Cupix::Event\.publish" app/ lib/ reference count unchanged PASS base.rb: the single Cupix::Event.publish(event.serializable_hash(...)) call site is preserved (moved inside begin block, not deleted or duplicated). No new call sites introduced. event.rb still defines def publish(event_body) at the visible tail. Reference count preserved.

Issues Found#

차단 이슈 없음.

Observations#

  1. lib/cupix/event.rb rescue branch adds ~12 lines vs plan estimate of "3-5 lines". The extra lines re-apply self.formatter = Cupix::EventFormatter.new and self.level = $CUPIX_LOGGER_LEVEL || Logger::INFO on the fallback logger — defensible (keeps formatter/level consistent even for the null logger, avoids nil formatter surprises downstream). Non-blocking.
  2. Rescue in event.rb catches SystemCallError only. This covers all Errno::* (which is what the cluster reports). If File.open ever raised a non-SystemCallError (e.g., IOError, SecurityError), it would still propagate. Plan explicitly scoped this to Errno::* / SystemCallError, so this matches the plan — flagging for awareness only.
  3. In base.rb, the warn log uses class: self.name (module/class context), consistent with the surrounding outer-rescue log call. In event.rb, the warn uses class: self.class.name (evaluates to "Cupix::Event"), which is appropriate for instance-context logging. No inconsistency introduced.
  4. legacy_publish_err local variable name is distinct from the outer e, avoiding shadowing — good hygiene.
  5. base.rb warn message includes model.class.to_s and model.id but not event_params; the outer error log includes both plus error: e. Minor asymmetry, non-blocking (warn path is expected to be common noise during logrotate windows; keeping it lighter is reasonable).
  6. Prior content at content/docs/incidents/d971e389-a359-4d46-9e42-7fb1e3c90ef6/validation.mdx was for an unrelated config/schedule.rb cron-splitting plan; overwritten with this attempt's verdict.