pierrejeambrun opened a new pull request, #76541:
URL: https://github.com/apache/airflow/pull/76541
Follow-up to #76309, addressing the review comments that landed after it
merged. Each one made the Skills section of the AI Model tab show something
other than what the run did, which defeats its purpose of tracing an agent's
behaviour back to the skills it used.
- **Calls that never ran were counted.** A `run_skill_script` the reviewer
denied, or one interrupted by a crash and replayed on a durable retry, showed
up as a call. Only tool returns with `outcome == "success"` count now.
- **`async with agent:` erased the counts.** The agent enters the toolset
instance itself as well as the copy `for_run` hands the run; the original never
sees a run, exited last and overwrote the counts with `calls: {}`. Only the
run's copy publishes now.
- **A seeded `message_history` brought another task's calls.** The counts
covered the whole conversation, so a skill an earlier task loaded showed as
loaded here, next to this task's clone commit. Only the run's own messages
count now; they add to what an earlier run of the same try published (before an
approval pause or a review regeneration), whose transcript comes back as
history.
- **An empty repository failed the task.** `repo.head.commit` raises on a
repository with no commits, and the error was reported as a failed clone. The
commit is `None` there and the section says no skills were found.
- **Links broke for remotes on a custom port or `ssh://` without a user.**
`https://` and `ssh://` remotes are parsed with `new URL()` (an HTTPS port is
kept, an SSH port is dropped since the web UI is not on it); the regex only
handles `git@host:path`.
- **An empty skills list hid the section,** which looked the same as a run
without the toolset. It now says "No skills found in the toolset's sources."
- **The badge tooltip was mouse-only.** The badge is a focusable button with
an `aria-label`, like `StatBox`'s info button.
- Docs mention the skills section in the offloaded-XCom caveat, and the
tests kaxil pointed out now check the reverse location order and that the
failed push was attempted.
When a run resumes from an approval pause after its branch moved, the entry
still shows the commit the resumed run cloned, with the calls of both runs; the
docs say so.
### End-to-end (abm, real model)
A Dag with one task per scenario, run on `main` and on this branch:
| Task | `main` | This PR |
|---|---|---|
| `async with agent:` around a run that loads `sql-style-guide` | `calls:
{}` | `load_skill: 1` |
| Load `row-counter`, reviewer **rejects** `run_skill_script` | `load_skill:
1, run_skill_script: 1` | `load_skill: 1` |
| Seeded with the transcript of a task that loaded `sql-style-guide`, loads
nothing | `load_skill: 1` | `calls: {}` |
| `GitSkills` on an empty repository | task fails: `Failed to clone ...:
Reference at 'refs/heads/master' does not exist` | succeeds, empty list |
The existing skills Dag (approval pause, durable retry, full replay) still
shows `load_skill: 1` for each task.
_Screenshots below._
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Claude Code (Opus 5.5)
Generated-by: Claude Code (Opus 5.5) following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
--
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]