Skip to content

fix: HandleQueue gracefully handles missing qfile configuration#12

Draft
Koan-Bot wants to merge 1 commit intoPerl-Toolchain-Gang:mainfrom
Koan-Bot:koan.atoomic/fix-issue-11
Draft

fix: HandleQueue gracefully handles missing qfile configuration#12
Koan-Bot wants to merge 1 commit intoPerl-Toolchain-Gang:mainfrom
Koan-Bot:koan.atoomic/fix-issue-11

Conversation

@Koan-Bot
Copy link

@Koan-Bot Koan-Bot commented Mar 19, 2026

Summary

When the smoker is started without qfile configured, HandleQueue->new() unconditionally passed qfile => undef to PostQueue->new(), which validates the attribute and dies with a confusing internal error: Test::Smoke::PostQueue must have qfile as defined attribute in new()!.

The generated smoke script already guards against invoking tshandlequeue.pl when qfile is unconfigured, but this crash could still occur if the script is run directly or from an older generated script.

Fixes #11

Changes

  • HandleQueue->new(): Only create the PostQueue and Poster objects when qfile is defined
  • HandleQueue->run(): Return early (no-op) when _queue was not initialized
  • t/app/170-handlequeue.t: Add test covering the no-qfile case (must run before the singleton is created)

Test plan

  • New test in t/app/170-handlequeue.t reproduces the crash: creates HandleQueue without --qfile and asserts no exception is thrown
  • All existing t/app/170-handlequeue.t tests continue to pass
  • t/postqueue.t and t/poster-post.t unaffected

Generated by Kōan /fix


Quality Report

Changes: 2 files changed, 39 insertions(+), 14 deletions(-)

Code scan: clean

Tests: skipped

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

When the smoker is started without qfile configured, HandleQueue->new()
would unconditionally pass qfile=>undef to PostQueue->new(), which
validates the attribute and dies with a confusing internal error.

Guard PostQueue creation behind a defined-check on qfile so that
HandleQueue is a no-op when the queue feature is not configured.

Fixes Perl-Toolchain-Gang#11

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

Test::Smoke::PostQueue must have qfile as defined attribute in new()!

1 participant