ADR-0094 — Supervision and the mandatory co-sign¶
- Status: Accepted (supersedes three parts of ADR-0092: decision 1's offer
rule, decision 11's
needs_sign_off, and decision 12's rule for when " — not co-signed" clears and its limit to a student's part. Decisions 13, 14 and 15 below say what replaces each. Amends ADR-0093 (d), as (b) below says. Builds the slice 3c-3 design's §3.1–§3.3) - Date: 2026-11-07
- Spec version at acceptance: 0.96
- Issues: draft PR #1013 (GUI sign-in slice 3c-3a). Design:
docs/superpowers/specs/2026-11-06-sign-in-slice-3c-3-supervision-and-pending-signatures-design.md(§3.1–§3.3); plan:docs/superpowers/plans/2026-11-07-sign-in-slice-3c-3a-supervision.md. Touches #1010 (not guaranteed (b)) and settles the later-vouch mark ADR-0092's Consequences left to #1003. Residuals: #1014 (not guaranteed (d)), #1015 ((p)), #1017 ((q)), #1018 (an unconfirmed assigner's refusal words) and #1016 (the slice's other residuals). - Builds on: ADR-0092 (the vouch, the sign-off, the pure rules and the
words) · ADR-0093 (a repudiated signature counts as unsigned) ·
ADR-0085 (the enroller grant, unconfirmed,
rotate-keykeeps the actor) · ADR-0083 (the vault, the strip) · ADR-0012 (additive-only evolution) · ADR-0021 (logic below the UI)
Context¶
On paper, a probationary doctor's entries are countersigned by a supervisor until the supervisors end the probation. Ending it does not countersign yesterday's entries. Who supervises whom is a list or a note in a staff file. A supervisor may also initial a registrar's entry as reviewed, though nothing obliged them to.
Until this slice only a student's part waited for a co-signature, because the student role is pinned on the actor
(ADR-0092 decision 10). A co-sign by any non-student other than the writer cleared it, and nothing said who
supervised whom. This slice, 3c-3a, records supervision, makes "— not co-signed" follow that record as it stood
when the part was signed, lets only a supervisor clear a mandatory co-sign when the writer had one at the co-sign's time, and adds
"Co-sign as reviewed". No event type, twin, floor rule or projection changes. The record lives in the actor registry
(db/004, db/052 in place), the doors in db/072 (SCHEMA_GENERATION 72), and the rules in pure Rust over NoteRow.
Decision¶
The maintainer's rulings¶
- The record is ops on
actor_event(2026-11-07, plan review), the table wheregrant-enrolleralready lives. It is carried by the registry's existing backup slot and restore door (db/052). A separate table would have had to duplicate both:vault_*tables are in no backup (ADR-0083). - Nobody acts on their own supervision as the supervisee (2026-11-07). This is wider than design §3.1's "no self-dealing". Otherwise a supervisee holding the assigner right could unlink their supervisors and fall into the no-supervisor fallback (decision 13), where any clinician's co-sign clears theirs. Without the assigner right, a supervisor may step away from the link or lift their supervisee's co-signing, and nothing else; an assigner may also link themselves as someone else's supervisor (decision 9).
- A re-sign under an UNCONFIRMED key counts (2026-11-07; this closes the question 3c-3b left open). It reads
"(signer unconfirmed)", as built.
vouch::re_signsasks only that the vouch's key is not repudiated and is of the same actor, never whether it is confirmed. ADR-0085: unconfirmed never blocks signing by itself.
The record (db/004, db/052)¶
- Six new ops, each a row with NO key and
approved_by NOT NULL: link-supervisor/unlink-supervisorsit on the SUPERVISEE'sactor_idand name the supervisor in a new column,actor_event.related_actor(additive, ADR-0012). The rows sit on the supervisee because every later question is about them ("does this writer's note need a co-sign, and whose clears it?");require-cosign/lift-cosignsit on the person;grant-assigner/withdraw-assignersit on the holder of the "assigns supervision" right.
Only a link row carries related_actor. A second guarded DO block widens actor_event_op_check and
actor_event_op_shape, and names any existing row that would break the new shape before it changes the
constraints. cairn_actor_append gains p_related BYTEA DEFAULT NULL; its 5-argument form is dropped first, so
existing calls resolve to the default. For a link op p_related must be an enrolled human actor other than the
row's own actor; every other op refuses one. The existing clock-behind refusal applies to all six. approved_by is
the approver's hex key, or 'console'; approval is the approver's token, NULL for the console. Pins:
db/tests/004_actors_test.sql; restore_actor_registry_supervision.rs's the_supervision_ops_survive_a_restore,
a_tampered_related_actor_is_refused.
- "As of t". The state of each family (link/unlink for one supervisor, require/lift, grant/withdraw) at time
t is its latest row with
recorded_at <= t, latest by(recorded_at, seq), asactor_currentorders. - A part's t is its
event_log.hlc_wall, nevert_effective, which is freely backdatable. - A vouch's t is its own
hlc_wall. - The comparison is at the millisecond. A registry row's
recorded_athas microseconds; an HLC wall has milliseconds.Supervision::from_rowsfloors each row's time to the millisecond, so a row in the same millisecond as a part counts as in effect at it.
Pins: note/supervision.rs's the_requirement_is_read_as_it_stood_at_t, a_link_is_read_as_it_stood_at_t,
a_row_in_the_same_millisecond_as_the_part_is_in_effect, a_tie_on_recorded_at_takes_the_later_row.
-
A student needs co-signing by role. Nothing is stored for it, and
require-cosign/lift-cosignon a student are refused. A graduate re-enrols as a new actor, so the requirement falls away by itself (design §3.1). -
Restore carries the new ops, and the export is a one-way door.
restore_actor_registry(db/052) accepts the six op words, decodesrelated_actorfrom hex, inserts it, and refuses a present row that differs only in it.ActorRegistryRow.related_actoris#[serde(default, skip_serializing_if = "Option::is_none")], so an export whose rows carry norelated_actorhas today's shape (localstate_wire_pins.rsis unchanged). An export that carries a link row does not decode on an older build (deny_unknown_fields). One that carries any of the six ops decodes there, but the older build's restore door refuses the op word. So a backup taken after the first supervision act restores only on a 3c-3a build.
The doors (db/072)¶
-
One approver rule, one address.
cairn_supervision_approveris the approver rule's one home. The approver must be a vault member whose key is their actor's current key. Anyone but a superuser also needs that keyconfirmedoroutside, as an enroller does (ADR-0085 decision 3). The token must be the approver's own attestation over the act's address. The address is'\x1220' || sha256('cairn-supervision' \n op \n staff(subject) \n COALESCE(staff(supervisor), '') \n prior), wherestaff()iscairn_vault_staff_idandprioris theseqof the family's latest row (0 for none). A token is therefore good for one change of one state. The door's own refusals startcairn_supervision_act:(the console door's,cairn_supervision_console_act:), name their check, and never echo the token; the finalcairn_actor_appendcan still refuse in its own words (cairn_actor_append: this machine's clock reads …). Nothing parses the prefix: the window classifies a refusal by its SQLSTATE. An assigner is a member whose latest assigner row is a grant. Pins:supervision_doors.rs::an_unconfirmed_member_cannot_approve;supervision_doors_approver.rs'sa_stale_token_is_refused,a_token_by_another_key_than_the_approvers_is_refused,an_approver_whose_key_is_not_current_is_refused,a_non_member_cannot_approve;db/tests/072_supervision_test.sql(the address preimage). -
The matrix lives in one function,
cairn_supervision_apply, which the window's door (cairn_supervision_act) and the console's (cairn_supervision_console_act) both run. It locks the subject's member row (FOR UPDATE), finds the supervisor's actor, reads the prior, checks the approver (the console approves itself, as'console', with no token), applies the refusals below, then callscairn_actor_append.
| op | approved by | refused when |
|---|---|---|
link-supervisor |
superuser, assigner | supervisee = supervisor; either party a superuser or admin; the supervisor a student; approver = supervisee; the link already stands |
unlink-supervisor |
superuser, assigner, the supervisor themself | approver = supervisee; no link stands |
require-cosign |
superuser, assigner | a student; a superuser/admin; approver = the person; already required |
lift-cosign |
superuser, assigner, a current supervisor of the person | a student; approver = the person; not required |
grant-assigner / withdraw-assigner |
superuser only | a superuser holder; a no-op |
A holder of the assigner right may link themselves as someone ELSE's supervisor (design §3.1). Who may hold the
right is site policy: a superuser may grant it to any non-superuser member, a student included (controller
ruling; principle 9). The console door applies the party and state refusals but none of the approver checks.
Pins: supervision_doors.rs's link_supervisor_by_a_superuser_or_an_assigner_with_every_refusal,
unlink_supervisor_by_a_superuser_an_assigner_or_the_supervisor,
require_cosign_by_a_superuser_or_an_assigner_with_every_refusal,
lift_cosign_by_a_superuser_an_assigner_or_a_current_supervisor, grant_and_withdraw_assigner_by_a_superuser_only,
a_supervisee_cannot_act_on_their_own_supervision_even_as_assigner, a_supervisor_may_step_away_and_lift,
the_console_door_shares_the_matrix_without_an_approver.
-
Two readers, and the grants.
cairn_supervision_record()returns every row of the six ops, actors as hex,ORDER BY recorded_at, seq; it is granted tocairn_window.cairn_supervision_staff()returns every non-superuser member as of now:needs_cosigning(true for a student),assigner, and the staff IDs of the supervisors whose link stands (the enroll row's pinned handle when the member row is gone). It is granted tocairn_agent, withcairn_supervision_actandcairn_supervision_prior. Those four and the console door areSECURITY DEFINER SET search_path = public, pg_temp; the helpers are invoker. Only the pure address keeps PUBLIC EXECUTE: every other function is revoked from PUBLIC, and the console door and the helpers get no grant. Pins:supervision_doors.rs'sthe_record_lists_every_act_in_order,the_staff_list_says_who_supervises_whom_now;window_role_vault_doors.rs::the_windows_supervision_doors_run_under_its_own_login;floor_execute_grants.rs::public_cannot_execute_the_supervision_doors. -
The node library and the console verbs (
cairn_node::supervision_admin).actreads the prior and the address from the database, signs the address withvault_admin::approve, and runs the window's door.console_actruns the console door;staffreads the panel rows. The CLI verbs arecairn-node supervision-set --op <word> --staff-id <id> [--supervisor <id>]andcairn-node supervision-list. Both refuse a non-local connection (conn_posture::require_local).supervision-setchecks--supervisor(required for exactly the two link ops) before it connects, as a runtime error (controller ruling); clap refuses an unknown op word. Pins:supervision_admin_lib.rs'sact_links_and_lifts_through_the_door,console_act_needs_no_token,staff_reads_the_panel_rows;cli_vault_refuses_remote.rs'ssupervision_set_refuses_a_remote_database,supervision_set_parses_strictly.
The read (note::read, note::supervision)¶
-
The note read loads the record once and annotates each part.
list_patient_notesreadscairn_supervision_record()once, on the caller's client. It shares the notes' snapshot only when the caller gives one: the window's read runs inin_snapshot(REPEATABLE READ), while the re-read insidevouch::vouch_as_shownruns under READ COMMITTED, so there the record and the notes are two statements.NOTES_SQLgainse.hlc_wallas its last column (NoteRow.recorded_at), andparse_voucheskeeps each vouch'shlc_wallasPartVouch.at.supervision::annotatethen stamps four plain facts for the part's writer:NoteRow.needs_cosigning: the record required the writer to be co-signed at the part's time;NoteRow.writer_supervisors: the writer's supervisors NOW;PartVouch.by_supervisor: the vouch's signer supervised the writer at the vouch's time;PartVouch.writer_supervised: the writer had any supervisor at the vouch's time.
The writer is
supervision::writer_actor:signed_by's actor, elsedrafted_actor. It isNonefor a signer this node cannot place (an empty actor), and a part with no writer keeps every default. With every fact at its default, the co-sign rules of decision 13 are the pre-slice rule with two differences: a part its student writer signed only by a later vouch now owes its co-sign, and a non-student's attested sign-off on a part whose envelope key is not a human's clears it, where the old rule neededco-signed, which the floor refuses there. The offer and the words differ too:needs_sign_offalso asksawaits_cosign, so in the #1010 / ADR-0093 (d) case "Sign off this note" stays offered (decision 14), and every waiting student part reads "— not co-signed (no supervisor recorded)" (decision 15). An op word the build does not know fails the read rather than being ignored. Actors are compared throughvouch::same_actor, so an empty actor is nobody's supervisor. Pins:note/supervision.rs'sannotate_judges_the_requirement_at_the_parts_time,annotate_judges_each_vouchs_supervisor_at_its_own_time,an_unplaceable_signer_is_no_writer,annotate_leaves_a_part_with_no_writer_alone,an_unknown_op_word_is_an_error,an_empty_actor_is_nobodys_supervisor.
The co-sign rules (note::cosign, note::vouch)¶
-
When a co-sign is owed, and whose vouch clears it.
writer_signature(p)is the signature a co-sign countersigns:signed_by, else the first vouch by the part'sdrafted_actorunder a key that is not repudiated (a part that went in unsigned, signed later by its writer). It isNonefor asigned_bywith an empty actor (controller ruling: an unplaceable signer judges nothing).cosign_required(p): the partpart_is_signed, does notcounts_as_unsigned(ADR-0093), and its writer's signature is a student's orp.needs_cosigningholds. A part that went in unsigned is judged at its ownhlc_wall, the commit, not at the writer's later signature.clears_cosign(p, v): the vouch is by a key that is not repudiated, of a known actor other than the writer's, AND either its signer supervised the writer at the vouch's time (any role, attested or co-signed: design §3.2 Q4), or, the fallback, the writer had no supervisor at the vouch's time and a non-student's vouch is the strongest countersignature the floor allows ON THAT PART: aco-signedone, or, only where the part's envelope key is not a human's (signer_human_actorisNone, where db/071 refusesco-signed), an attestedsign-off(controller ruling). The floor also admits an attested sign-off on a human-signed part; it does not clear the mark (not guaranteed (b)).- A vouch made BEFORE the writer's own later signature still counts (controller ruling): it named the same bytes.
awaits_cosign(p): required, and no vouch clears it. Supervisors share the load: whichever co-signs first clears it for all of them.
This supersedes ADR-0092 decision 12's clearing rule ("clears only for a
CoSignedvouch by a non-student of a different actor") and its limit to a student's part. Pins:cosign_tests.rs'sa_probationers_part_reads_not_co_signed,a_non_supervisors_co_sign_does_not_clear_it,a_supervisors_attested_sign_off_clears_it,with_no_supervisor_any_clinicians_co_sign_clears_it,a_part_signed_later_by_its_writer_still_needs_its_co_sign,a_sign_off_before_the_writers_own_signature_still_counts,an_unplaceable_signer_owes_no_co_sign;note_supervision.rs'sa_lifted_requirement_leaves_the_earlier_part_waiting,only_a_supervisor_clears_a_mandatory_co_sign,a_pre_slice_students_part_is_cleared_by_any_clinician,a_part_gone_in_unsigned_is_cleared_by_a_clinicians_sign_off. -
"Sign off this note" stays offered while a part awaits its co-sign.
needs_sign_off(parts)issigned_off_by(parts).is_none() || parts.iter().any(awaits_cosign)(design §3.2 Q2). A probationer who signed every part is named bysigned_off_by, yet the note still waits for a supervisor (or, where she had none at the vouch's time, the fallback's countersignature). The offer still never depends on the presser. If the writer had a supervisor when the co-sign was made, a non-supervisor's sign-off is recorded and read, but the part keeps its mark and the offer stays. This supersedes ADR-0092 decision 1's offer rule and decision 11'sneeds_sign_off. Pins:cosign_tests.rs::the_offer_stays_while_a_mandatory_co_sign_is_missing;note_supervision.rs::only_a_supervisor_clears_a_mandatory_co_sign. -
The words (
view::part_byline, still the one producer of part bylines):- the mark is " — not co-signed" while the part
awaits_cosign, and " — not co-signed (no supervisor recorded)" when the writer has no supervisor NOW (writer_supervisorsis empty), so nobody in particular is waited for; - it sits straight after
signed_by's words or, for a part with nosigned_by, straight after the words of the vouchwriter_signaturepicked; - a repudiated, not re-signed signature still reads " — counts as unsigned" in its place, never both
(
cosign_requiredis false for such a part).
E.g. "signed by Dr Bea — not co-signed · co-signed by Dr Zed" (Zed is not her supervisor); then "signed by Dr Bea · co-signed by Dr Zed · co-signed by Dr Sue" once her supervisor co-signs. A student with no supervisor recorded: "signed by Sam (student) — not co-signed (no supervisor recorded)". Every pre-slice expectation of " — not co-signed" changed only by that suffix. Pins:
cosign_tests.rs::a_repudiated_part_reads_counts_as_unsigned_not_both; the byline assertions of decision 13'snote_supervision.rstests;view_tests.rs. - the mark is " — not co-signed" while the part
"Co-sign as reviewed" (note::review, notes_review.rs, notes_compound.js)¶
-
The node gesture vouches only the presser's supervisees' parts.
review_vouches(parts, presser)plans each part that:part_is_signed, does notcounts_as_unsigned, and is notcosign_required(clearing an owed co-sign is Sign off's job);- was signed by its WRITER (
cosign::writer_signature: its own signature, or the drafted writer's later vouch), that writer not the presser and having the presser among their supervisors NOW. Notwriter_actor, which falls back todrafted_actor: a part gone in unsigned that a colleague signed off and its writer never signed would be offered, and design §3.3 covers only the parts the supervisees signed; - has no vouch by a supervisor of the writer (at that vouch's time) under a key that is not repudiated, and has not been signed by the presser.
Once any supervisor has reviewed a part, nobody is offered it. The role is
vouch::planned_role, the arm Sign off's planner already used, extracted unchanged:co-signedexactly where db/071 admits it,attestedotherwise.review_noterunsvouch::vouch_as_shown, the transactionsign_off_notenow also runs: the presser is the signing KEY's actor, never the who's-here claim (ADR-0092 decision 16); the note is re-read;Changedunless it holds exactly the parts shown;NothingToSignfor an empty plan. The vouch IS asign-offvouch, so, whereplanned_rolepicksco-signed, it reads " · co-signed by …" (the attested case is (l)). Pins:review.rs'sreview_vouches_only_the_pressers_supervisees_parts,review_skips_a_part_that_needs_a_co_sign,once_any_supervisor_reviewed_it_no_one_is_offered_it,a_colleagues_sign_off_of_a_timer_part_is_not_the_writers_signature;note_review_cosign.rs'sa_supervisor_co_signs_a_reviewed_note,review_never_vouches_another_writers_part,the_key_not_the_claim_decides,a_part_added_after_it_was_shown_refuses_changed,a_colleagues_sign_off_of_a_timer_part_is_not_reviewable. -
The window command
note_review_cosignkeepsnote_sign_off_impl's order (ADR-0092 decision 14): the chart on screen, fixture mode, the ids, the key, one node call, an unknown outcome (#814), then a timing sample undernote-sign-offfor a success only (a refusal or a failure returns first, and an unknown outcome is not timed).CompoundView.can_reviewiscan_reviewfor the who's-here claim's actor, false with no claim; it only decides the offer. A review settles with its OWN words, not Sign off's (controller ruling: Sign off's "every part of the note now carries your signature" is false of a review). They are "Your review signature was recorded — the chart shows which parts it covers." (role-neutral, a later controller ruling: an attested review reads " · signed off by", (l)), "This note changed since it was shown — read the chart again, then co-sign it. Nothing was signed." and "There is nothing here for you to co-sign as reviewed. Nothing was signed.". Pins:notes_review_tests.rs'scan_review_follows_the_claims_supervision,review_words_are_exact,review_follows_sign_offs_order;notes_review_db_tests.rs'sa_supervisor_reviews_from_the_window,the_key_not_the_claim_decides_in_the_window. -
The webview's "Co-sign as reviewed" is drawn when
compound.can_review && noteDraft === null, beside "Sign off this note" when both apply. Its accessible name is "Co-sign as reviewed: " + the note's time. Its press ispressSignOff's: the who's-here gate (claimAsked(), elseaskWhosHere), nothing while the editor holds a draft orsignInFlight(), the button down and the pane's in-flight flags held until it settles. It settles with "reviewed", "not-reviewed" or "review-unknown", which the who's-here picker words in its own lines: "Your review co-signature went through — open the chart to see which parts it covers.", "Your co-signature signed nothing — open the chart to see where the note stands." and "Whether your co-signature went through is not known — check the chart." The first names no parts (controller ruling): a review can skip some of the presser's supervisees' parts. No dialog. Pins:notes_sign_off_webview_tests.rs'sreview_is_offered_only_when_the_view_says_so,review_sits_behind_the_whos_here_gate_and_refuses_in_flight,its_accessible_name_is_co_sign_as_reviewed_plus_the_time,a_switch_during_a_review_says_what_the_review_did,no_dialog.
The panels (supervision_panel.rs, supervision.js)¶
-
Two panels over the same doors. The assigner's panel (
#supervision-panel) lists every non-superuser member and draws buttons from each row's state: require or lift co-signing (not for a student), grant or withdraw the assigner right, unlink each supervisor, and link a supervisor by staff ID. "My supervisees" (#my-supervisees) lists the members whose supervisors include the who's-here claim's staff ID. It offers only "Lift co-signing" (when required, not for a student) and "Step away". With nobody named, it says so before the database is asked. A member who needs co-signing with no supervisor reads "needs co-signing · no supervisor recorded" (a student: "needs co-signing (student) · no supervisor recorded"), so the gap has an owner (design §3.4). The lists are read with no credential. Pins:supervision_panel_tests.rs'sthe_gap_row_reads_no_supervisor_recorded,my_supervisees_needs_a_named_claim,an_assigner_links_and_a_supervisor_lifts_from_the_window. -
The panel's key is released for one act and never held.
supervision_keykeepssuperuser_key's order: refuse a blank passphrase,forget_held_key, lock, thenrelease_for_actwithPurpose::Clinicaland, onRelease::RefusedPurpose, once more withPurpose::Enrol. A superuser's or an admin's key serves onlyenrol, and the vault refuses the purpose before it counts a try, so the retry costs nothing. Every other answer goes throughfrom_release_noting; it never callssigner_for_act. The door decides who may act. The window says a deliberate refusal in one sentence of its own and never shows the door's words. Every act clears the strip and re-reads the pressing panel. A failed re-read never says "nothing was recorded". A later good read clears an earlier failure's sentence, in both panels and in the superuser panel, while an act's own outcome stays. The lift's sentence is "{id} no longer needs notes co-signed. Notes signed while it was required still need a co-signature if they have none." (controller ruling: true when no notes wait). Pins:supervision_panel_tests.rs'sa_supervision_act_wipes_then_releases_and_holds_nothing,a_superuser_key_is_released_for_enrol_after_a_refused_clinical,a_failed_supervision_read_never_says_nothing_was_recorded,supervision_act_clears_the_strip_both_ways,a_good_read_clears_a_stale_status,the_lift_sentence_claims_no_waiting_notes,no_dialog;superuser_panel_tests.rs::a_good_read_clears_a_stale_status.
What is not guaranteed¶
- (a) The record is node-local, so the same note may read differently on another node until slice 5 (design §3.1
Q6). The local record applies to every note this node reads, its own and its peers'.
actor_eventrows replicate nowhere and travel only in this node's local-state export (ADR-0093 (i)). A peer whose record differs may read a part "— not co-signed" that this node reads cleared, or the reverse. - (b) #1010's residual, under the fallback. A non-supervisor's ATTESTED sign-off of a part whose envelope key is
a human's does not clear the mark (decision 13). This is ADR-0093 (d)'s case: a sign-off before a student's
re-sign was planned attested. The part now
awaits_cosign, so, unlike ADR-0093 (d)'s "the button is gone for everyone", "Sign off this note" stays offered. The earlier signer's press answersNothingToSign, because they have signed the part. A press by any other non-student co-signs it and clears the mark (#1010). - (c) A raw client can still file a
co-signedvouch by a non-supervisor. db/071 checks only that the envelope key is another human's; no floor rule reads the record. While the writer had a supervisor at that vouch's time, it is read (" · co-signed by Dr Zed") and clears nothing. Where the writer had none, the fallback counts it, as before this slice. - (d) The clocks are not one clock, and "as of t" can be judged wrong. A registry row is timed by this
database's clock (
recorded_at,clock_timestamp()); a part and a vouch by the node's HLC wall (hlc_wall), a peer's included. One peer event up to 24 h ahead (db/001's drift ceiling) ratchets the LOCAL HLC forward, so LOCAL parts and vouches signed afterwards carry a future wall too. Alift-cosignrecorded later in real time can then judge those earlier parts as signed after it and clear their " — not co-signed". Symmetrically, arequire-cosigncan mark parts signed before it, and anunlink-supervisorcan revoke co-signs given before it. The times are compared at millisecond granularity, flooring the registry time, so a row in the same millisecond as a signing counts as in effect. A restore keeps the originalrecorded_at. The proper fix is to HLC-stamp the six ops, so both sides of the compare are one clock (#1014). - (e) A part that went in unsigned is judged at its commit, its own
hlc_wall, not at the time its writer later signed it. A requirement recorded between the commit and that signature does not apply to the part. - (f) Review timings share the
note-sign-offtiming kind, so the timing aggregates (RUNBOOK §5) cannot tell a review from a sign-off (no db/044 widening). - (g) The panels do not refresh each other, and "My supervisees" is not re-read on a who's-here change or an idle re-lock. A list drawn for one person can stay on screen for the next. The key still decides every act.
- (h) The panels draw buttons the door will refuse, such as "Grant assign-supervision right" for a presser who is not a superuser, or "Link a supervisor" on an admin's row. The refusal is said plainly and the list is re-read. The link field is not in a form, so Enter does nothing, and a press with a blank supervisor clears the strip.
- (i) A probationer sees "Sign off this note" on a note they wrote alone, and pressing it answers
NothingToSign, as a student does (ADR-0092 (e)). The offer never depends on the presser. - (j) A note of two or more parts can read "signed off by Dr Zed" while a part still reads "— not co-signed".
compound_statedoes not askawaits_cosign, as design §3.2 allows: a non-supervisor's sign-off is recorded and read. - (k) A supervisor who re-enrolled as a new actor cannot step away from a link made to their old actor: the door
compares actors. A subject with no member row cannot be acted on, by the window or the console (as db/063's
cairn_vault_set_enroller). - (l) An attested review reads " · signed off by", not " · co-signed by". On a supervisee's part whose envelope
key is not a human's,
planned_roleplansattested. No test pins those words. - (m) No test isolates a re-sign under an unconfirmed key (decision 3): it holds because
re_signsnever readsunconfirmed. - (n) Finding what to co-sign is chart by chart until 3c-3c's person menu (design §3.4).
- (o) The window's commands against a database are pinned only by DB-gated tests (
notes_review_db_tests.rs;supervision_panel_tests.rs'san_assigner_links_and_a_supervisor_lifts_from_the_windowanda_superuser_key_is_released_for_enrol_after_a_refused_clinical), which CI does not run (#905). - (p) When "Sign off this note" and "Co-sign as reviewed" both show, neither says what it covers. Design §3.3's "each says what it covers" is not built: the clinician must know that Sign off vouches every part and a review only their supervisees' (#1015).
- (q) "Nobody acts on their own supervision" compares role-actors, not persons. One person can hold two role-actors
(db/061), and the person behind them is not modelled until
#168. So a clinician under supervision whose own
adminrole-actor holds the assigner right can unlink their supervisor, or lift their co-signing, by signing as that admin. Decision 9 leaves who may hold the right to site policy, so the door does not refuse it (#1017).
Consequences¶
- Easier. A probationary doctor's part reads "— not co-signed" until one of their supervisors co-signs it, and lifting the probation leaves the earlier parts waiting, as on paper. A supervisor can initial a supervisee's note as reviewed. A student's part signed only by their own later vouch now carries the mark too, which ADR-0092's Consequences left open (#1003). Steps (paper N → built M → target K):
- record "B supervises C": 1 → 1 (one act, the strip's passphrase counted with it as slice 1 counts it) → 1;
- set or lift
needs_cosigning: 1 → 1 → 1; - co-sign a reviewed note from the opened chart: 2 (open the folder, sign) → 2 ("Co-sign as reviewed", the passphrase) → 2;
- see that a part still needs its supervisor: 1 (look for the countersignature) → 0 (the byline) → 0.
No M > N. Time budgets, owed by a human in RUNBOOK §25: a supervision act ≤ 3 s; co-sign as reviewed ≤ 3 s
(Sign's, RUNBOOK §16/§23). No decision is forced: the byline names what is pending, and "(no supervisor
recorded)" names the gap.
- Harder. Every reader that asks "does this part still wait for a co-sign?" must go through
cosign::awaits_cosign over an annotated NoteRow, never signed_by.student. Every judgement of the record must be
"as of" the part's or the vouch's own hlc_wall, never now; among the note rules only the "(no supervisor
recorded)" suffix and the review offer read the record as it stands now. A seventh supervision op must be added to
db/004's two CHECKs, cairn_actor_append, db/052's
op list, db/072, supervision::family (which fails the read on an unknown word), SupervisionOp and the CLI's
word list at once.
- The bet. That a byline naming what is pending, and the gap row in the assigner's panel, are enough for
supervisors to find and clear their supervisees' parts, chart by chart, until 3c-3c's menu. We would know it is
wrong if a probationer's parts stay "— not co-signed" for weeks, or if "(no supervisor recorded)" rows stay in
the panel with nobody acting on them.
- Pinned by db/tests/{004_actors,072_supervision}_test.sql;
crates/cairn-node/src/note/{supervision,cosign_tests,review,view_tests}.rs's tests;
crates/cairn-node/tests/{supervision_doors,supervision_doors_approver,supervision_admin_lib,restore_actor_registry_supervision,note_supervision,note_review_cosign,window_role_vault_doors,floor_execute_grants,cli_vault_refuses_remote}.rs;
cairn-gui/cairn-gui-tauri/src/{notes_review,notes_review_db,supervision_panel,notes_sign_off_webview}_tests.rs.
RUNBOOK §25 carries the human measurements.