Skip to content

CAMEL-26699: camel-jbang - the chaos mark of an exchange on the Activity tab is not cut - #29362

Merged
davsclaus merged 1 commit into
mainfrom
CAMEL-26699-activity-mark
Nov 6, 2026
Merged

davsclaus merged 1 commit into
mainfrom
CAMEL-26699-activity-mark

Conversation

@davsclaus

Copy link
Copy Markdown
Contributor

CAMEL-26699, found in the hands-on round: on the Activity tab the chaos mark of a faulted exchange was cut to 🎲r. The EXCHANGE column was 16 wide, and a real short id (3F2A85…-104E, 12 columns) plus the mark ( 🎲r1, with a 2-column dice) needs 17 or more. The column is now as wide as its widest marked exchange, and at least 16 as before.

The test used an id whose short form was 2 characters shorter than a real one (…-1E), which is why it passed. It now uses a realistic id.

Tests: ChaosMarksTest, ActivityTab*Test and SourceSizeTest pass.

Claude Code on behalf of Claus Ibsen

🤖 Generated with Claude Code

https://claude.ai/code/session_012nJsFsjqqFiwroeHRWaKbS

…ity tab is not cut

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
@github-actions github-actions Bot added the dsl label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No issues found.

The root cause is correctly identified: shortExchangeId() truncates to 6 chars before …- then appends the counter without leading zeros, so a counter like 104E (4 hex chars) produces a 12-column display string vs 1E (2 chars) that produces 10. Add the 2-column dice emoji and trailing rule tag and the 16-column floor is breached.

The fix is correct:

  • exchangeWidth is initialized to 16 (the previous hardcoded floor) and updated lazily per-entry during the row-build loop
  • ChaosMarks.ruleOf() is cached into rule and reused for the cell, avoiding a redundant call — nice incidental cleanup
  • CharWidth.of() is consistent with the same idiom used in SourceLiveColumn, TuiHelper, and LogTab
  • The column's .widths() applies to both header and data rows, so both are widened together

Pre-fix validation: ✅ — The old test used 3F2A85F3D4213-0000000000000001E (short form 3F2A85…-1E, display width 15 with mark, fits in 16 cols). The new test uses 3F2A85F3D4213-000000000000104E (short form 3F2A85…-104E, display width 17, overflows 16 cols before the fix). The test correctly fails without the fix and passes with it.

This review was generated by an AI agent, Hermès on behalf of @gnodet.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-jbang/camel-jbang-plugin-tui

🔁 1 test passed only after a retry on JDK 21 (1 retried attempt)

Recovered flaky tests on JDK 21 (1)
Module Test Failed attempts First failure
dsl/camel-jbang/camel-jbang-plugin-tui LaunchManagerOutcomeTest.startedWhenTheStatusFileSaysSo 1 expected: null but was: LaunchOutcome[ok=false, log=null]

ℹ️ These tests did not fail the build. Surefire retried them and they passed.
Retries are enabled project-wide by surefire.rerunFailingTestsCount in parent/pom.xml.


🔬 Scalpel shadow comparison — Scalpel: 2 of 717 tested, 1 compile-only — current: 2 all tested

Maveniverse Scalpel detected 2 affected modules (current approach: 2).

Skip-tests mode would test 2 modules (1 direct + 1 downstream), skip tests for 1 (generated code, meta-modules)

Modules Scalpel would test (2)
  • camel-jbang-plugin-tui ← dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ActivityTab.java, dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosMarksTest.java
  • camel-launcher-container ← downstream of org.apache.camel:camel-launcher
Modules with tests skipped (1)
  • camel-launcher

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

All tested modules (3 modules, 0.9s total)

Total reactor time: 0.9s

Module Duration Status
Camel :: Launcher :: Container 0.9s SUCCESS
Camel :: JBang :: Plugin :: TUI n/a
Camel :: Launcher n/a

Top 20 slowest modules:

  • Camel :: Launcher :: Container (0.9s)

⚙️ View full build and test results

@davsclaus davsclaus added this to the 4.24.0 milestone Nov 6, 2026
@davsclaus davsclaus self-assigned this Nov 6, 2026
@davsclaus davsclaus added the enhancement New feature or request label Nov 6, 2026
@davsclaus
davsclaus merged commit 81f8824 into main Nov 6, 2026
6 checks passed
@davsclaus
davsclaus deleted the CAMEL-26699-activity-mark branch November 6, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dsl enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants