Repository navigation
feat(worker): publish agent work through the GitHub bot #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b8d7dac
chore: claim quest/m0/kix/publication
kixelated fba0c10
feat(worker): publish agent work through the GitHub bot
kixelated 076790f
Merge origin/main into quest/m0/kix/publication
kixelated 39efeb0
fix(worker): verify the branch before delivery and keep closed PRs fo…
kixelated 122594b
Merge origin/main into quest/m0/kix/publication
kixelated 519cbac
fix(worker): limit planning to quest documents and refence before del…
kixelated 22103b2
fix(worker): publish symlinks with their Git mode
kixelated b5a58cf
Merge remote-tracking branch 'origin/main' into worktree-agent-a59c33…
kixelated File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| -- The commit the job's branch holds, as far as kix has published or observed | ||
| -- it. NULL until the first publication creates the branch; an iteration starts | ||
| -- at the pull request's head. | ||
| ALTER TABLE jobs ADD COLUMN head TEXT; | ||
| -- A commit whose branch update is in flight. If the Worker stops before | ||
| -- recording the outcome, the next publication finds it on the branch and | ||
| -- adopts it instead of treating it as someone else's write. | ||
| ALTER TABLE jobs ADD COLUMN pending TEXT; | ||
| ALTER TABLE jobs ADD COLUMN pendingAt INTEGER; | ||
| -- The pull request this job delivered, which later deliveries update. | ||
| ALTER TABLE jobs ADD COLUMN pull INTEGER; | ||
| -- Publication decisions are service-authored, unlike agent questions. SQLite | ||
| -- cannot alter a CHECK constraint, so rebuild the table. | ||
| CREATE TABLE job_questions_new ( | ||
| id TEXT PRIMARY KEY NOT NULL, | ||
| job TEXT NOT NULL REFERENCES jobs(id) ON DELETE CASCADE, | ||
| attempt INTEGER NOT NULL, | ||
| kind TEXT NOT NULL CHECK(kind IN ('agent','account','publication')), | ||
| prompt TEXT NOT NULL, | ||
| answer TEXT, | ||
| answeredBy TEXT REFERENCES user(id) ON DELETE SET NULL, | ||
| askedAt INTEGER NOT NULL, | ||
| answeredAt INTEGER, | ||
| UNIQUE(job,attempt) | ||
| ); | ||
| INSERT INTO job_questions_new SELECT id,job,attempt,kind,prompt,answer,answeredBy,askedAt,answeredAt FROM job_questions; | ||
| DROP TABLE job_questions; | ||
| ALTER TABLE job_questions_new RENAME TO job_questions; | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When this migration runs with an existing queued, running, or waiting
iteratejob, the newheadremains null even though that job's branch already starts at its recordedrevision. On its first publication,verify()sees the live PR branch atrevisionbut the stored null head and repeatedly pauses it as an externally created branch. Backfillhead = revisionfor existing iteration jobs as part of the migration.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disagree; leaving the migration without a backfill. Nothing that uses
jobsis deployed yet (the merged0008_output.sqldropsjob_outputfor the same reason), so no queued or running iteration job can exist when this runs. New iteration jobs start withheadset to the PR head at creation.(Written by Claude Opus 5.5)