Example: click-through-links tip via task_update in config.axl#1206
Example: click-through-links tip via task_update in config.axl#1206gregmagolan wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e1b37cc4a7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "body": "{% if aspect is defined %}{{ aspect[0] }}\n{% endif %}" + | ||
| "{% if bes is defined %}{{ bes[0] }}\n{% endif %}" + | ||
| "{% if ci is defined %}{{ ci[0] }}\n{% endif %}", |
There was a problem hiding this comment.
Show retried invocation links instead of the first only
When --bazel-retry-attempts starts a later Bazel attempt, bazel_runner creates a fresh invocation and updates sink_invocation_id / Bazel invocation_id, so the accumulator can contain both the failed first-attempt links and the final attempt links. These templates always render [0], so after a retry the tip continues to point users at the first failed invocation/BES page rather than the current or final one; either render all accumulated links or use the latest value for per-invocation links.
Useful? React with 👍 / 👎.
f9a5506 to
ec1d98d
Compare
e1b37cc to
2166b9d
Compare
ec1d98d to
91c1102
Compare
2166b9d to
8978e8f
Compare
91c1102 to
2f08e20
Compare
8978e8f to
bf1c87a
Compare
…hook Gives tips three customization axes plus an interception hook. Surfaces: a `surfaces` allowlist (SURFACE_CLI / _GHSC / _BK / _GITLAB / _PR_SUMMARY, plus TASK_SCREENS / AGGREGATE_SCREENS / SURFACE_ALL shorthands; empty = all) gates which status screens render a tip. `collect_tips_sorted(ctx, surface=...)` filters via the shared `tip_shows_on` predicate; the CLI print is gated on SURFACE_CLI. Within-task repeat: `on_repeat` controls a same-id re-emit within one task — REPEAT_REPLACE (default, last-wins so a task can revise its own tip) or REPEAT_ACCUMULATE (union JINJA2 accumulators + re-render). Cross-task aggregation: `aggregate` governs the PR-summary rollup — AGGREGATE_AUTO (default: collapse by rendered content, one row per distinct title/body with side-by-side divergent variants), ALWAYS (collapse all; union accumulators; newest wins), NEVER (exclude). tip_suggestion hook: a `TipsTrait.tip_suggestion` hook fires on every add_tip with a TipInfo and returns TIP_ACCEPT / TIP_REJECT / tip_replace(...), letting config.axl veto or rewrite any tip — the same accept/reject/replace shape as repro_fix_suggestion. The built-in add-github-token-scope tip is REPEAT_ACCUMULATE + AGGREGATE_ALWAYS to keep its scope union on both axes. The Tips feature's `seed` arg is removed — tips are created via the standard add_tip path (e.g. from a task_update handler) which now respects all of the above. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2f08e20 to
308fa88
Compare
bf1c87a to
75f8a11
Compare
75f8a11 to
ca280b8
Compare
✨ Aspect Workflows Tasks📅 Thu Jun 4 17:09:08 UTC 2026
|
cdeff85 to
1b95825
Compare
Demonstrates the per-tip surfaces/aggregate controls: a custom `info` tip registered inline in `config(ctx)` via `lifecycle.task_update.append(...)`. It reads the Aspect Web UI, BES, and CI build URLs off each `TaskUpdate` and surfaces whichever it knows — one link per line in the built-in metadata-row style. Links may resolve across separate updates; the JINJA2 accumulator tip re-renders in place. `surfaces = TASK_SCREENS` keeps these per-invocation links off the cross-task PR summary. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1b95825 to
4df29de
Compare
A worked example of the per-tip
surfaces/aggregatecontrols added in #1202: a custominfotip that surfaces click-through links on every build/test task.Registered inline in
config(ctx)by subscribing to thetask_updatelifecycle event — no new framework hook. The handler reads three links off eachTaskUpdatethe way the built-in surfaces do and shows whichever it knows, one per line in the built-in metadata-row style:sink_invocation_idjoined ontoASPECT_WORKFLOWS_BES_RESULTS_URL(mirrorsresolve_aspect_url).render_bes_url(Bazel'sinvocation_id+bes_results_url).detect_build_url+ the per-host icon/label fromdetect_ci_host(🐙 GitHub Actions, ⭕ CircleCI, 🏗 Buildkite, 🦊 GitLab CI).It's a
TIP_TEMPLATE_JINJA2accumulator tip keyed on a stable id, so links that resolve across separate updates merge into the one tip and re-render in place.surfaces = TASK_SCREENSkeeps these per-invocation links off the cross-task PR summary.Stacked on #1202 (base branch
custom-links-tip-example); the diff is.aspect/config.axlonly once that lands.Changes are visible to end-users: no
Test plan
CIRCLECI=true CIRCLE_BUILD_URL=… ASPECT_WORKFLOWS_BES_RESULTS_URL=… aspect build //examples/lint:hellosurfaces the tip with the link bar, deduped across the build'stask_updateemits;buildifierclean.