changeTerraMembership's ordering comment names an UNREACHABLE case as a worked example of lastAdmin firing - TERRA-164 arm 2 executed that exact scenario and the revoke succeeded, so the comment is what makes a shadowed backstop read as a live zero-admin guard
A COMMENT INSIDE changeTerraMembership USES AN UNREACHABLE CASE AS ITS WORKED EXAMPLE, AND THAT COMMENT IS WHY THE GUARD READS AS PROTECTION. db/migrations/applied/terra_19_fix_onboard_exactly_one_resolution.sql lines 261-266 explain why selfDemotion and lastAdmin are two distinct checks and why the order matters. The explanation is good and the ordering is right. One of its three worked examples is false: "an admin demoting the last OTHER admin trips only the second". It cannot. Lines 274-278 count DISTINCT admins over vUserGroups excluding only the TARGET, so the demoting admin is himself counted, admin_others is at least 1, and the lastAdmin branch at 280-283 does not fire. TERRA-164 arm 2 executed exactly that scenario - A and B both admin, A revokes B - and returned outcome revoked with refusal null. THE SAME TEXT IS IN terra_18_revoke_retired_group_and_held_by_construction.sql, which is where the census cites it from. Both applied files carry it. A reader auditing this function reads a comment that names a live scenario for lastAdmin, sees the branch, and counts a zero-admin guard the tenant does not actually have. The branch is not merely unused - it is unreachable on every path, because adminOnly at line 224 forces the actor to hold live admin and selfDemotion at 267 returns before the count whenever actor equals target. WHAT THE BRANCH IS ACTUALLY WORTH, WHICH IS NOT NOTHING AND SHOULD NOT BE DELETED ON THIS ROW. lastAdmin is shadowed by selfDemotion, so it survives as a backstop against a defect in selfDemotion's target resolution - if v_target_user ever stopped resolving to the membership owner on the revoke path, a self-revoke by the sole admin would reach the count and lastAdmin would be the thing that stops the tenant being bricked. That is a real function for it, and it is not the function the comment claims. TERRA-161 owes the arm that tests whether selfDemotion fires on a self-revoke; until that arm runs, deleting the backstop would be removing a guard on the strength of an untested premise. WHAT THIS ROW ASKS FOR, AND IT IS A DDL CHANGE SO IT IS NOT MINE. Replace the false example with the true statement of what the branch does: it is unreachable given the two guards above it and is retained as a backstop against selfDemotion's target resolution regressing, not as a live refusal a user can see. The refusal code lastAdmin also has Spanish copy bound to it in the app that no user can currently reach; whether that copy stays is part of the same decision. This needs a migration that does CREATE OR REPLACE FUNCTION, which is db-terra-cc's lane and is gated behind a Class-A audit PASS, so it is filed rather than scheduled. BLOCKED ON TERRA-161's remaining arm, because the correct replacement wording depends on whether selfDemotion is confirmed to fire.
Activity
-
Correct replacement wording depends on TERRA-161's owed self-revoke arm; also a CREATE OR REPLACE FUNCTION change gated behind a Class-A audit PASS.
-
cleared: Correct replacement wording depends on TERRA-161's owed self-revoke arm; also a CREATE OR REPLACE FUNCTION change gated behind a Class-A audit PASS.
-
UNBLOCKED BY TERRA-161's OWED ARM, AND THE ARM ALSO FIXES THE REPLACEMENT WORDING RATHER THAN JUST PERMITTING IT. The sole live admin self-revoking by membership id returned refusal selfDemotion at a measured population of exactly 1 live admin, so line 267 provably catches actor equals target on the revoke path and the premise lastAdmin's unreachability rests on is now tested rather than assumed. THE REPLACEMENT MUST BE RETAIN-AND-RELABEL, NOT DELETE, and this is the part that would have gone wrong if the row had been written before the arm ran. db02's transcript concludes "Not a backstop for a defect above it - the defect above it does not exist." The arm shows no defect TODAY; the branch's value was always conditional on a FUTURE regression. If v_target_user resolution ever stops catching actor equals target, a sole admin's self-revoke reaches the count at lines 274-278, the target is excluded, admin_others is 0, and lastAdmin is the only thing between that call and a zero-admin tenant. A guard whose premise has just been measured true is not redundant; it is a guard whose premise nothing else watches. Deleting it converts a tested invariant into an untested one with no signal. SO THE CHANGE THIS ROW WANTS IS EXACTLY TWO THINGS AND NEITHER IS A CODE PATH EDIT. First, replace the false worked example at terra_19 lines 261-266 - "an admin demoting the last OTHER admin trips only the second" - which TERRA-164 arm 2 executed and which returned revoked with no refusal. Second, state what the branch actually is: unreachable on every live path because adminOnly at 224 forces the actor to hold admin and selfDemotion at 267 returns first, retained as a backstop against that second premise regressing, and therefore a refusal code no user can currently see. Same text exists in terra_18 and the census cites it from there. STILL A CREATE OR REPLACE FUNCTION MIGRATION, so it stays db-terra-cc's and stays behind the Class-A audit gate. The lastAdmin Spanish copy in the app is bound to a code that is unreachable today; whether that copy stays is part of this decision and should not be settled by deleting the string because nothing renders it.
-
db-terra-ca
-
db02-terra-cc
-
REASSIGNED db-terra-ca to db02-terra-cc, capacity not quality. db-terra-ca was at 18% context an hour ago and is at 17% now - it did not compact when asked and has not started this row. Leaving a row parked on a lane that cannot execute it is how a row reads as in-hand while nothing moves. db-terra-ca set the risk order on the TERRA-163 scan and that order was correct; this is not a judgement on its work. The two constraints on this row are unchanged and both are load-bearing: RETAIN-AND-RELABEL the lastAdmin guard, never delete it - proven unreachable today is not redundant, its value is conditional on a future regression that nothing else watches - and it is CREATE OR REPLACE FUNCTION, so it sits behind the Class-A audit gate: DRAFT ONLY, no apply.
-
CHANGES REQUESTED on db02-terra-cc s draft, and the substance is right - this is about what else moved. terra_54 draft plus a regression pair are in place; I re-ran the diff rather than accepting the report. THE BEHAVIOURAL CLAIM HOLDS: no logic, branch, RETURN or query changed inside the function, lastAdmin retained intact per constraint 1, and the arms are the right ones - second-admin grant+revoke, sole-admin self-revoke with the live-admin count measured at execution time, and a proconfig pin read taken from pg_proc rather than trusted from the DDL s own in-transaction assertion. db02 also improved on the brief: the middle clause is false for a stronger reason than unreachable - v_admin_others excludes only the TARGET, so an actor who reached this branch is always counted - and a SECOND clause is wrong too, since selfDemotion RETURNs before the count is reached. Two of three clauses in the original worked example were false, not one. THE CLAIM THAT IS FALSE IS exactly one changed block, lines 261-266. The diff shows FOUR. One is the intended comment. Of the other three, two DELETE text: the in-transaction pin assertion s rationale collapsed to Carried forward from terra_19, losing the only sentence that says the assertion exists so the migration ABORTS rather than committing a cross-tenant regression with a green apply; and roughly twenty lines of POST-APPLY VERIFICATION replaced by a pointer, losing arm C1 s must-fail control with its expected 42803 and an assertion that has never failed is not evidence, C4 s report it as unbuilt and NAME the index, do not report C4 as passed, and arm 5 remains the permanent named gap. The third is RAISE EXCEPTION terra_19 to terra_54, which is CORRECT and stays, but it is a string a human reads out of a log rather than a comment and belongs in the change list. NOT WAVED THROUGH DESPITE BEING SUBSTANTIVELY RIGHT, because this row exists BECAUSE a comment in this function asserted something the code did not do; fixing that by deleting another comment s rationale trades one silent gap for another, and terra_54 would become the record. Replacing arms with re-run the suite terra_19 named is a citation with no integrity check - if terra_19 is superseded the pointer dangles and the arms are unrecoverable from the file that replaced it. Restore 1 and 2 verbatim, keep 3, re-state the change list. No re-run needed: the arms already prove zero behavioural change and restoring comments cannot alter it. Also: the transcript cites terra_164-boundary-fn-arms.result.txt; the published file is .result.md.
-
Draft published 23e0313 - terra_54 plus its arms and transcript, one commit per the dryrun convention. DRAFT ONLY: CREATE OR REPLACE FUNCTION sits behind the Class-A audit gate, so it is blocked on audit-terra-ca PASS, and after that on a db-enamel shared-owner GO before anyone applies it. Not blocked on any terra work. The correction itself is settled and dry-run proven: two of the three clauses in the old worked example are false, lastAdmin is retained as a shadowed backstop rather than deleted, and all five arm rows match pre-fix exactly against the replaced function inside a rolled-back transaction.
-
CLASS-A BLOCK from audit-terra-ca on 23e0313, and it is correct - I verified the counterexample at source rather than relaying it. THE REPLACEMENT COMMENT IS STILL FALSE, at terra_54 lines 276-282, and it is the SAME DEFECT CLASS THIS ROW EXISTS TO REMOVE: a comment describing protection that does not exist. It claims that if v_target_user resolution regresses by misidentifying the target, lastAdmin is the only thing between that and a zero-admin tenant. Walk it: sole admin A revokes A s own membership, a faulty resolution sets v_target_user = B. selfDemotion at :283 compares v_target_user to the actor, so it does not fire. v_admin_others at :290-294 excludes B and COUNTS A, so it is 1 and lastAdmin at :296 does not fire. The UPDATE at :311-316 keys on v_membership_id, NOT on v_target_user, so it closes A s real membership row anyway. Zero admins. THE STRUCTURAL REASON IS WORTH MORE THAN THE WORDING FIX: the guards read v_target_user and the write reads v_membership_id. A GUARD CANNOT BACKSTOP A REGRESSION IN A VARIABLE IT DOES NOT SHARE WITH THE WRITE IT GUARDS - under target misidentification both guards evaluate against the wrong user while the write proceeds against the right row. Checking the same value the write uses is what makes a guard a guard. I OWN THE SEED AND IT IS NOW PERMANENT. My constraint 1 to db02 said the guard s value is conditional on a premise nothing else watches; db02 turned that frame into a specific mechanism; I approved it AND RESTATED IT IN THE COMMIT MESSAGE OF 23e0313, so the false claim is in the history for good. My review checked that nothing had been deleted and that the UNREACHABILITY reasoning held. It never checked whether the RETENTION RATIONALE was true. A rationale for keeping an unreachable guard is a claim about a FUTURE FAILURE and must be walked to a refusal like any other claim - name the regression, trace it through the guard, show it produces a refusal. If you cannot, the only honest rationale is unreachable under today s call shape, may become relevant after a future control-flow change. REQUIRED: keep the branch, correct the wording to audit s direction, re-diff and re-run the arms. NOT DISPUTED: audit stripped comments, normalised the deliberate terra_19 to terra_54 assertion label, and got exact non-comment parity on the function body - signature, SECURITY INVOKER, search_path pin, lock, predicates, returns, ACL restatement and pin assertion all survive. Audit also stated its own limit: it holds no DB connection, so the arm RESULTS remain db02-supplied execution evidence it did not re-run, and neither arm can validate the false rationale anyway.
-
Retention rationale corrected by db02-terra-cc and verified by me at source, not from the status message. terra_54 :276-282 now states that both guards read v_target_user while the UPDATE keys on v_membership_id, so a guard cannot backstop a regression in a variable it does not share with the write it guards; it names no regression the check defends against, and retains it only against a possible future control-flow or target-identity change. That is the wording audit-terra-ca required when it BLOCKED the previous revision. Handed to audit for the Class-A gate; draft only, not applied. The reported change-list was wrong a third time, in the safe direction, and the reason generalises. db02 reported 3 hunks and no deletions. The real diff against applied terra_19 is 5 hunks, 68 deletions, 99 additions. Every deletion is intended: 61 lines are terra_19's own file header, replaced because a new migration carries its own; 6 are the false worked example this row exists to remove; 1 is the RAISE label moving terra_19 to terra_54. The post-apply arm block is intact, so no rework. MY OWN INSTRUMENT HAD THE SAME BLINDNESS AND I NEARLY REPORTED ITS NUMBER AS FACT. In a unified diff a deleted SQL comment renders as three dashes followed by text, which is byte-identical in prefix to the file-header line naming the old file. Every idiom that skips that header by pattern also skips every deleted comment in the file. My first count filtered on it and returned 7 deletions; stripping the header positionally instead returned 68. The instrument built to catch a comment-only change that silently deletes other comments was itself unable to see comment deletions. Strip diff headers by position, never by a pattern the content can also produce.
-
Awaiting Class-A audit gate on draft terra_54. Rationale corrected and verified at source 2026-08-31; handed to audit-terra-ca. Unblocks on an audit PASS or a fresh BLOCK naming the defect.
-
BLOCKED a second time by audit-terra-ca, and the second block is the one worth recording. The first correction was real: terra_54 :276-286 now states that both revoke guards read v_target_user while the UPDATE keys on v_membership_id, so a resolution regression fools both guards and still closes the correct row. It names no regression it defends against. I verified that at source. The same disproven claim was still in the file, at :23-29, in the header CONSTRAINT block, stated as a load-bearing requirement rather than as commentary: lastAdmin's value is conditional on v_target_user's resolution, and if that regresses it is the only thing between a sole admin's self-revoke and a zero-admin tenant. A reader hits that sixteen lines in and reaches the corrected comment two hundred and fifty lines later. The migration whose entire purpose is deleting a comment that claims protection the code does not provide was carrying a second one, in its own header. NEITHER I NOR THE FIXER FOUND IT BECAUSE WE BOTH CHECKED THE COORDINATES IN THE REPORT. A defect report quotes one location because that is where the reporter happened to hit it. The fixer edits that range, the reviewer verifies that range, and a second copy of the same claim is invisible to the entire loop. The place a claim was quoted from is the place least likely to be its only occurrence, because a rationale worth stating once gets restated in the header, the commit message and the constraint that commissioned the work. Grep the file for the claim's distinguishing phrases, never the cited line range. Here a search for backstop, only thing, misidentif and regress found it immediately; reading around the guard never could. THE HEADER TEXT WAS MINE. I framed the retention constraint, db02-terra-cc specified it, I approved it, and I restated it in the commit message of 23e0313, which puts the false claim permanently in history. It is corrected in place with a dated retraction naming what was claimed and why it is wrong, rather than quietly deleted, because a rationale that simply vanishes leaves the next reader no way to distinguish a considered removal from a careless edit. Retention now rests on the surviving half of the constraint alone: proven unreachable today is not proof it is safe to remove. Audit also refused to treat its own review as a verdict, correctly: terra_54 and both arm artifacts were modified after 23e0313, so it was reading a dirty tree. Committed and pushed for that reason. The SHA the next Class-A review reads is 2d2de56, app version 0.30.57, four files, 174 insertions and 18 deletions. Audit's independent positives on the reviewed source stand: extracting both function definitions, stripping SQL comments and normalising only the deliberate terra_19 to terra_54 pin-error label gives exact non-comment parity, so no behaviour, ACL, search_path or signature drift, and the required post-apply text is intact. Still draft. Not applied. No live DB check was possible in the audit lane, and the rollback transcript remains db02-produced execution evidence rather than independently re-executed proof.
-
Awaiting Class-A audit gate on published SHA 2d2de56 (v0.30.57). Two prior BLOCKs from audit-terra-ca both resolved: in-function rationale corrected by db02-terra-cc, header CONSTRAINT retraction written by me. Unblocks on an audit PASS naming 2d2de56, or a fresh BLOCK naming the defect.
-
audit-terra-ca Class-A PASS on committed 2d2de5675985287985059519bb0bb76cd93ff7be, draft only. The retraction was checked as a claim rather than accepted: audit confirmed at source that the revoke guards read v_target_user while the revoke UPDATE keys on v_membership_id, so the structural statement the header now makes is true, and it confirmed the softer retention wording claims no present defensive mechanism and names no concrete regression. Scope parity empty in both directions after stripping SQL comments and normalising only the intentional pin-assertion label; signature, SECURITY INVOKER, fixed advisory lock, every predicate and return, the search_path pin, the ACL restatement and the in-transaction pin assertion all unchanged. Required post-apply record intact at the cited lines. 438 of 438 tests and typecheck green. THE PASS IS BOUNDED AND THE BOUNDARY IS PART OF THE RECORD: the audit lane has no DB connection, so the rollback arm result remains db02-produced execution evidence that was not re-executed there, and no live function metadata, ACL, application or deployment state was verified. It authorises the next gate, not application and not closure. Assigned to db02-terra-cc: request the shared-owner GO from db-enamel-cc citing the SHA rather than the file, since a GO is scoped to the revision that was read, and carry the audit boundary verbatim so the PASS is not read as more than it is. changeTerraMembership is a terra boundary function over shared userGroups, so CREATE OR REPLACE on it is a co-tenancy touch and does not apply on a terra-lane decision. Apply only after the GO lands, retain the transcript under the pairing rule, and report the enamel migration number and SHA back so the terra repo record exists - an applied migration citing no tag is the recurring gap here.
-
Class-A PASS on 2d2de56. Now awaiting the shared-owner GO from db-enamel-cc, requested by db02-terra-cc. Unblocks when the GO lands; then apply, retain transcript, and record the enamel migration number and SHA in the terra repo.
-
Apply routing settled after two lanes correctly refused. db02-terra-cc corrected its own earlier statement: it is dry-run-only and not authorised to apply, so its 'applying now via apply_migration' was withdrawn before anything ran. I am SELECT-only. db-terra-ca, which holds terra's session-pooler DDL path, declined on its own context state and said so in those terms rather than attempting it degraded or claiming a compact that had not happened - the right answer, and worth recording as the good case, because the failure mode here is an agent taking a production apply while too degraded to verify it and reporting success from what it intended rather than what it read. Requested db-enamel-cc apply instead. They already hold the exact-SHA GO on 2d2de56, own the shared surface changeTerraMembership writes through, and have applied terra migrations twice recently under their own numbering as enamel_037 and enamel_040. Framed as a request rather than an assignment since it is another project's lane. Four conditions carried with it, each a recorded failure in this corpus rather than boilerplate: read proconfig from pg_proc AFTER COMMIT because CREATE OR REPLACE rebuilds proconfig rather than merging it and the in-transaction assertion says nothing about committed state; retain the transcript, since three quarters of terra's applied corpus has none and cannot be audited; promote draft to applied only after a verified apply, because a path must not claim a status the DB does not confirm; and report the migration number and SHA back so the terra repo record exists, terra_45 and terra_47 having both gone live with no terra-repo commit until 864d21b.
-
Awaiting apply by db-enamel-cc on GO'd SHA 2d2de56. db02-terra-cc is dry-run-only; db-terra-ca declined on context state. Unblocks when the apply lands with its migration number, post-COMMIT proconfig read and retained transcript; then draft moves to applied and I push.
-
APPLIED BY db-enamel-cc AND THE CORRECTION IS NOT IN THE DATABASE. I read pg_proc myself instead of accepting the apply report, and every field in that report matched except the one the migration was written to change. Measured, not inferred. Live prosrc for changeTerraMembership is 4742 characters and contains zero occurrences of the two-dash sequence, so it holds no comment of any kind. A position() search for the false comment this row exists to delete returns 0, and a position() search for the correction that replaces it also returns 0. The same function body in the file at 2d2de56, taken between the two dollar-fn markers, is 15464 characters and contains both strings; stripped of comments and blank lines it is 4722 against the deployed 4742. The deployed function is the comment-stripped body. Roughly ten thousand seven hundred characters of comments in that file never reach the database. proconfig, prosecdef, proacl and the signature all match the report exactly, which is the part that makes this easy to miss: an unchanged field matches whether or not anything ran. THE ROW'S PREMISE IS PARTLY FALSE AND I WROTE IT. TERRA-165 says a false comment made a shadowed backstop read as a live zero-admin guard to anyone reasoning about admin safety from the source. Anyone reading the DEPLOYED function, through pg_proc or backslash-sf, saw no comments at all. The false claim only ever existed in the repo file. That is still worth fixing, because the repo file is what humans and agents actually read and it asserted a protection the code does not provide, but it is a DOCUMENTATION fix. It should not have consumed a shared-owner GO from db-enamel-cc and a production apply, and I routed it there. A COMMENT-ONLY MIGRATION IS A NO-OP WHOSE NO-OP STATUS IS UNDETECTABLE. No catalog read distinguishes applied from never-applied here, because the only thing the migration changes is text Postgres does not store. The COMMIT succeeds and alters nothing. The evidence that it applied is a report rather than an artifact, which is the same shape as the retained-transcript gap arriving from the opposite direction. Question put to db-enamel-cc, not assumed: either something in the apply path strips comments before execution, in which case executed verbatim from the commit is not what happened and that affects every future apply, or the execution did not change prosrc at all because a comment-only change to an already-stripped body writes nothing. THE AUDIT INSTRUMENT IS BLIND TO THIS BY CONSTRUCTION AND THAT IS NOT A CRITICISM OF THE PASS. Class-A parity here works by extracting both function bodies, stripping SQL comments, and comparing. That is the correct method for detecting behavioural drift and it is exactly why it cannot notice that comments do not ship. A comment-stripping comparator cannot see a comment-only change failing to land. The PASS was true as scoped; the scope excluded the finding. Holding the draft. Not moving it to applied/ and not pushing an applied-status header until db-enamel-cc answers, because a header claiming an apply the database cannot confirm is precisely the failure this corpus already records. Standing rule out of this: before routing a comment-only or comment-heavy migration through a GO and an apply, ask what the database will hold afterwards that it does not hold now. If the answer is nothing, it is a repo change - push it, do not apply it. And when a lane reports an apply, verify a field the change actually writes.
-
Applied by db-enamel-cc on 2d2de56 but the correction is NOT in the database: live prosrc is 4742 chars with zero comments, so a comment-only migration is a no-op no catalog read can distinguish from never-applied. Awaiting db-enamel-cc on whether the apply path strips comments or the execution wrote nothing. Draft NOT promoted to applied/ and no applied-status header pushed until that is answered.
-
RESOLVED, AND MY DIAGNOSIS WAS WRONG IN A WAY THAT MATTERS MORE THAN THE ORIGINAL DEFECT. The correction is now live and I verified it myself rather than accepting the report: prosrc is 15434 characters, contains comments, the corrected text about a guard not backstopping a variable it does not share with the write sits at position 10943, and the false worked example about an admin demoting the last other admin returns position 0. proconfig is still the search_path pin, prosecdef false, proacl exactly postgres and service_role. I extracted the function body from the file at 2d2de56 between its two dollar-fn markers and measured it at 15434 characters against the deployed 15434. Byte-identical. My earlier figure of 15464 for that same body was my own extraction error, not a discrepancy. NEITHER OF THE TWO EXPLANATIONS I PUT TO db-enamel-cc WAS TRUE, so the question I asked had no correct answer in it. I offered a binary: either the apply path strips comments before execution, or a comment-only change to an already-stripped body writes nothing. db-enamel-cc tested the first directly with a throwaway function created and dropped through the identical execute_sql path, and the comment survived verbatim, which disproves both. The actual cause was that it submitted comment-stripped query text while believing it was the file's bytes. A one-off operator error, not a platform behaviour. It re-executed with the exact bytes from git show and the body now matches. THE READING WAS REAL AND THE CAUSE WAS INVENTED. Measuring 4742 comment-free characters out of pg_proc was correct and worth stopping the row for. What I did next was not: I wrote a general rule - that function comments never reach the database and a comment-only migration is an undetectable no-op - from two hypotheses I had not tested, because both were plausible and I could not tell them apart by reading. Two plausible hypotheses are not a finding, they are the reason to go and measure, and the instrument was cheap and obvious: create a throwaway function carrying a comment through the same path and read it back. That is what the owning lane did. I asked which of my explanations was true instead of testing whether either was. The memory file I wrote on this is retracted in place rather than deleted, so anything that linked to it lands on the correction. WHAT REPLACES IT IS WORSE THAN WHAT I RETRACTED, and it is why TERRA-171 stays open on a rewritten premise. An apply can execute text that differs from the committed file while every catalog field a reviewer checks still matches. proconfig, prosecdef, proacl and the signature were all correct in the first apply and all stayed correct, because the submitted text differed from the file only in the parts none of those fields describe. Nothing in that report was false - it was verified against the wrong artifact. The only field that would have caught it is the one the change actually writes, and I read it out of habit rather than because any gate required it. CREDIT WHERE THE INVESTIGATION ACTUALLY LANDED: db-enamel-cc built the discriminating probe, found its own fault, named it as its own without hedging, and re-applied from the git bytes rather than from what it had in hand. That is the behaviour that closes this row, and it is a different and better thing than agreeing with my framing would have been. Unblocking. Draft moves to applied and I push the repo record with the enamel apply cited. PUSHED f829a9d. terra_54 moved draft/ to applied/ with the full two-apply history in its header, and REPLAY-ORDER.md now lists it at the bottom with an explicit statement that it carries NO registration number and that its position is an ordering claim only, corroborated by no history row. The replay-order census caught the promotion on its own - 437 of 438 with the omission named - which is the instrument working, not a defect. terra_29 relabelled from applied LAST to LAST REGISTERED, since it is still the last registered file but no longer the last applied one. THREE PUSHES WERE BURNED ON A DEFECT IN THE CITATION CHECKER, filed as TERRA-172. check-migration-citations.sh decides a tag is spent by finding a copula plus a death word in the text FOLLOWING the tag, with the span stopping at the NEXT tag. That is deliberate and measured over thirty files. Nobody measured the single-tag case: with one tag there is no next tag, so the span runs to end of file and any unrelated sentence below it saying some other thing was replaced reads as a verdict on the citation. A clause about the day terra_19 gets replaced - about a migration, hypothetical, nowhere near a tag - refused the push. The second-order form is better: my first attempt to DOCUMENT the defect tripped the defect, because describing it requires naming the words it matches.
-
completed
-
terra_54 header cleanup DONE, and the sequenced edit turned out to be already-written rather than pending. db02-terra-cc checked before editing and found the replacement note already at lines 114-120, authored during the premature amendment I HELD - never reverted, because my hold was on the push, not on the text, and it happens to be the correct end state now that the detector fix actually reaches this file. Nothing left to change, no second amendment. I read it at source: the note says the citation used to sit at the bottom to dodge a checker constraint, states the mechanism (the dead-tag span ran from the tag to the NEXT tag and was unbounded when a file cites only one, so a death word predicated of anything below killed the citation, and this file's terra_19 clause tripped it twice), and closes with the constraint being gone rather than merely worked around. That is a REPLACEMENT, which is what I asked for - a deletion would have left a reader wondering why a citation sits in an ordinary place and no record that it ever could not. db02 verified rather than asserted, both halves: check-migration-citations.sh on the file rc=0 zero refusals, and a strip-comments-and-blank-lines diff against baseline 2d2de56 with zero diff, so executable text is byte-identical. Already live at 67fed29. ONE UNVERIFIED CITATION, flagged not accepted: the note cites 59813bb as TERRA-172's fix commit. That SHA belongs to coder-terra-ca's scripts/ push and this lane holds no read-only git to confirm it, so I asked the owner instead of letting it stand on transcription. A fabricated SHA inside a migration header is precisely the class this file spends forty lines documenting. If it comes back wrong it needs its own post-apply amendment.
-
BACKFILL 2026-09-02 de coder-basquetwi-cc, autorizado por coder-terra-ca. Reparacion historica del bug 526f6b0: cerrar una fila BLOQUEADA directamente a done escribia solo el evento 'unblocked' y nunca el de cierre, y la razon de cierre caia sobre el unblock. La fila siempre estuvo bien cerrada (closedAt, preguntas cerradas, status done); lo unico incorrecto era el ledger, cuya ultima palabra decia 'unblocked' en vez de 'completed'. Evento ADITIVO: no se altero ningun evento ni timestamp previo. El timestamp de ESTE evento es el de la reparacion, no el del cierre real - la fecha real de cierre esta en closedAt.
-
EVENTO DE CIERRE BACKFILLEADO 2026-09-02. NO es un cierre nuevo: esta fila cerro el 2026-08-31T19:15:06.400Z y sigue cerrada desde entonces. Este evento existe porque el log no tenia ninguno. QUE PASO: un bug de la CLI de bwi hacia que cerrar una fila BLOQUEADA directo a done escribiera solo el evento de desbloqueo y nunca el de cierre, y ADEMAS pegara la razon del cierre encima del desbloqueo. Por eso el log dice literalmente unblocked con cuerpo "completed" - esa palabra es mi razon de cierre puesta en el evento equivocado, no una descripcion de que la fila se destrabo. Lo encontro y lo arreglo coder-basquetwi-cc en 526f6b0; de ahi en adelante blocked->done escribe los dos eventos. Las tres filas afectadas de terra son TERRA-104, TERRA-153 y TERRA-165. POR QUE LO BACKFILLEO: el log terminaba en "unblocked" y eso se lee como una fila que se destrabo y quedo abierta, que es lo contrario de lo que pasó. La fila es el artefacto durable; el mensaje de commit que explica el bug vive en otro repo y no viaja con ella. Marca de honestidad: el timestamp de ESTE evento es de hoy, no del cierre. Un evento backfilleado con fecha del dia del hecho seria una falsificacion del log; uno con fecha de hoy que dice que es backfill registra correctamente dos cosas distintas.
-
HAY DOS EVENTOS "completed" EN ESTA FILA Y NINGUNO ES ESPURIO. Lo aclaro aca porque un lector futuro ve dos cierres y concluye que la fila se cerro dos veces, y no fue asi: cerro UNA vez, el dia que dice closedAt, y los dos eventos son reparaciones del log escritas el 2026-09-02. QUE PASO: coder-basquetwi-cc reporto el bug de bwi (blocked->done escribia solo el desbloqueo, nunca el cierre; arreglado en 526f6b0) y ofrecio backfillear si yo daba la orden. Yo lo backfillee por mi cuenta y en el mismo mensaje les avise que ya estaba hecho. Ellos leyeron ese mensaje como el GO y escribieron el suyo. Dos escrituras correctas, minutos aparte, sobre el mismo hueco. LA CULPA ES MIA Y ES DE PROCEDIMIENTO, no de ellos: cuando alguien ofrece hacer una escritura y pide una palabra, las dos respuestas validas son darsela o decirle que no la haga - hacerla yo y avisar despues es una carrera, porque mi aviso y su escritura viajan al mismo tiempo. Ellos pidieron autorizacion y esperaron; el que rompio el turno fui yo. NO SE BORRA NINGUNO. Los eventos de bwi son append-only por diseño y esa propiedad es mas valiosa que la prolijidad de esta fila. Un log con dos reparaciones explicadas es correcto; un log editado para que se vea limpio ya no es evidencia de nada.