Repository navigation
Link Hackbot actions by their recorded IDs instead of Ref - #7270
ayoubdiourin7 wants to merge 3 commits into
Conversation
suhaibmujahid
left a comment
There was a problem hiding this comment.
Thank you! If the server instructions approach woks well, it will be a nice adn clean solution.
…/use-recorded-action-ids-uuid-generated-instead-o-2
…rop them from the system prompt
|
|
||
| When you record `phabricator_submit_patch` to create a new revision, do not also record `bugzilla_add_comment` in the same run. The patch description already appears as a Bugzilla comment, so another comment would be redundant. | ||
|
|
||
| When recording a Try push, include its Treeherder URL as {{{{actions.<ref>.url}}}} in the Phabricator revision's test_plan. Record the Try push before submitting the Phabricator patch. |
There was a problem hiding this comment.
We might want to test to make sure that we do not regress on this front.
|
|
||
| action = recorder.record("bugzilla.create_bug", body, reasoning=reasoning, ref=ref) | ||
| action = recorder.record("bugzilla.create_bug", body, reasoning=reasoning) | ||
| return confirmation(action) |
There was a problem hiding this comment.
As part of the confirmation process, we could list the fields it exposes, such as url, revision_id or bug_id, so the agent doesn’t have to guess. Alternatively, we could include that information in the tool description.
| type=action["type"], | ||
| params=action.get("params", {}), | ||
| ref=action.get("ref"), | ||
| ref=action.get("action_id"), |
There was a problem hiding this comment.
We need to stay backward compatible, at least for some time:
| ref=action.get("action_id"), | |
| ref=action.get("action_id", action.get("ref")), |
We should add a TODO to drop the backward compatibility part.
| referenced = { | ||
| match.group(1) | ||
| for row, _ in pending | ||
| for match in _PLACEHOLDER_RE.finditer(json.dumps(row.params)) |
There was a problem hiding this comment.
We should parse this only once ad save it as structured data. We could do that in a follow-up.
| result (`url`, or `bug_id` for a new bug) as `{{actions.<action_id>.<field>}}`; \ | ||
| it is filled in when the actions are applied. For example, if an action returned \ | ||
| `(ID: action-e42219b46c164b2c97785769d6bd1b3e)`, its `url` is \ | ||
| `{{actions.action-e42219b46c164b2c97785769d6bd1b3e.url}}`. |
There was a problem hiding this comment.
I recall discussing about having the action- prefix, and we decided to keep it since it is clearer for the agent. But now we are exposing it outside of the agent iteration. It becomes unnecessary prefix. We might want to drop that prefix.
Fixes #7232