hive-c0re: scrub manager-surface cookies + SetParent doc fix (#715 batch 7)

This commit is contained in:
damocles 2026-05-31 17:42:57 +02:00 committed by mara
commit 2bdb8c7d51
5 changed files with 37 additions and 37 deletions

View file

@ -246,7 +246,7 @@ impl Approvals {
Ok(())
}
/// Withdraw a pending approval (closes #250). Returns the now-updated
/// Withdraw a pending approval. Returns the now-updated
/// row so the caller can emit `ApprovalResolved` with the right
/// kind / agent / sha. Errors if the approval isn't pending — once
/// it's approved/denied/failed/cancelled, the resolution is final.
@ -329,8 +329,7 @@ impl Approvals {
/// deserialize. A single malformed / unknown-kind row must never blank
/// the whole list: `collect::<Result<Vec>>()` is all-or-nothing, so one
/// bad row used to make `pending()` / `recent_resolved()` error out
/// wholesale — the dashboard then rendered an empty approvals queue
/// (issue #160, an unhandled `init_config` kind poisoning every read).
/// wholesale — the dashboard then rendered an empty approvals queue.
fn collect_lenient(rows: impl Iterator<Item = rusqlite::Result<Approval>>) -> Vec<Approval> {
rows.filter_map(|r| match r {
Ok(a) => Some(a),
@ -435,7 +434,7 @@ mod tests {
#[test]
fn init_config_approval_round_trips() {
// Regression for #160: an `init_config` row used to fail
// Regression test: an `init_config` row used to fail
// deserialization (row_to_approval matched only apply_commit +
// spawn), erroring out the whole `pending()` query — every
// approval then vanished from the dashboard.
@ -465,9 +464,9 @@ mod tests {
#[test]
fn mark_cancelled_transitions_pending_row() {
// #250: manager withdraws a pending approval. Row leaves
// pending(), shows up in recent_resolved() with the cancelled
// status + a "cancelled by <who>" note.
// Manager withdraws a pending approval. Row leaves pending(),
// shows up in recent_resolved() with the cancelled status + a
// "cancelled by <who>" note.
let (_dir, _path, db) = open_temp();
let id = db
.submit_kind(