Repository navigation
feat: account settings, ai review as a bonus, schedule wording - #82
Merged
Merged
Conversation
describeSchedule is now scheduleText with a leading capital, and a clock schedule without a zone names UTC. The canvas node, the lane head, the CLI and MCP read-backs, the diff and the field's screen reader text all use it, so a 1 hour interval reads every 60 minutes everywhere.
… save The editor lints with the AI credit state the rules page reads. A live workflow drops the issue for a rule step it already runs, with the same liveSaveIssues filter the server uses, now in contracts.
The minute clock ticks on visibilitychange and pageshow, and every read computes the current minute, so no render shows a past slot. An enabled scheduled workflow's detail refetches as soon as the tab is visible.
Ready now needs a readable account balance at or above the floor. The key limit can only make the state out. With no account balance and room on the key, the check returns unknown, so an empty account stops flapping ready.
The only admin of a team org is refused. The personal org goes with the account and its repos are soft-removed. Review decisions keep their outcome and lose the name; manual re-runs keep the fact through a deleted-account marker.
The summary sits under the rule's name with the same redaction a failing reason gets, and members also see the model from the trace. The passed list stays folded and searchable.
…name Personal-org installs carry their forge, so the deletion flow links GitHub only for GitHub installs.
…g a repo off by id Every input is parsed with zod. Deletion needs the typed login, a session under a day old, no team org left without an admin and no repo left on that only you can turn off.
…tep delete General, Sessions, Orgs, Connections and Agents tabs. Deleting turns Tripwire off where nobody else can, lists what changes, then asks for the typed login.
sameCron and cronSpecKey compare what a cron runs, not how it is written, so 0 9 * * 1-5 and mon-fri match. Schedule timing uses the key, so a cron that reads back as a preset keeps its place. describeCron goes; the field's own words replace it.
cronText turns a cron into a phrase in the field's voice, and keeps it only when the phrase parses back to the same cron: every Sunday at 08:00 in Berlin, weekdays at 09:00, every 15 minutes, every 2 hours at :30, monthly on the 1st and 15th at 06:00. Anything else stays the raw cron. The field reads lists of times and month days and hour steps at a minute, and weekday names and the hourly minute read as every Monday and every hour at :15 everywhere.
AI review is a bonus. While credits are out, an AI review step carries a warning, AI review can't run until credits return, instead of an error. A workflow with it turns on, saves and pushes as usual, and reads Live, not Can't run. An off workflow shows no AI review issue at all. liveSaveIssues goes: it only existed to let the old error through. The rules page still refuses to newly turn the AI review rule on. isAiReviewNotRunStep names an AI review step that did not run.
… rules An AI review step that did not run, for credits, a missing provider or a failure, no longer counts toward the fail-closed floor and no longer sends a would-be pass to human review. The run, the check and any PR comment still say AI review did not run, for every one of those causes. The floor still counts every other rule, and replay counts the same way.
A clock cron without a stored zone shows the zone, like the canvas. Words that run at the saved schedule's times keep the saved schedule.
Comment on lines
+231
to
+236
| await tx | ||
| .select({ id: member.id }) | ||
| .from(member) | ||
| .where(eq(member.userId, userId)) | ||
| .for("update"); | ||
| const soleAdmin = await listSoleAdminOrgs(tx, userId); |
There was a problem hiding this comment.
Concurrent account deletions can leave a team without admins
Medium Severity
When a team has two admins and both delete their accounts concurrently, each transaction locks only its own user and membership rows. Both calls to listSoleAdminOrgs can therefore count two admins before either deletion commits, after which both users and memberships are deleted. Ordinary members and armed team repos remain, but nobody can administer them. Serialize the check and deletion on shared organization rows, or use serializable transactions with retries, so the second deletion observes the first and is blocked.
Collaborator
Author
deleteUserAccount now locks every org the user belongs to, in id order, before the sole-admin check. A second concurrent deletion waits for the first to commit, then sees one admin left and is blocked.
The plugin's remove, leave and role-change hooks check the admin count and write afterwards, outside one transaction, so two admins acting at once could both pass. A member trigger now locks the org row and refuses any delete or demotion that leaves a team org with no admin. The staff role change locks the same row first, so it still returns its refusal.
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
quick patches after #81, account settings, and ai review as a bonus.
workflows listshows schedule wordsmigration: 0032_account_deletion (moderation_items.decided_by on delete set null)