forge
Explore
Log in

Don't you dare go Hollow

Rename ponytail: comment marker to corner-cut:

Browse files at this commit

ed88733520ed5af3140c06b2840d577b5a3ca5f8Ahmet Kaan GümüşParent: c3c6d53
  • chore
    • rename ponytail: comment marker to corner-cut:
Show full message
chore: rename ponytail: comment marker to corner-cut:

Marker convention renamed after uninstalling the ponytail plugin;
semantics unchanged (deliberate corner-cut, known ceiling + upgrade path).
Token-only rename, 26 comment lines, no code change.
.claude/kb-sync.shmodified+1 -1
@@ -19,7 +19,7 @@ ingest() {
19 }19 }
20 20
21 check() {21 check() {
22- # ponytail: substring match on "<name>.rs" anywhere in README — a module22+ # corner-cut: substring match on "<name>.rs" anywhere in README — a module
23 # mentioned outside ## Layout also counts; tighten to the section if it lies23 # mentioned outside ## Layout also counts; tighten to the section if it lies
24 missing=""24 missing=""
25 for f in src/domain/*.rs src/web/*.rs; do25 for f in src/domain/*.rs src/web/*.rs; do
src/constant.rsmodified+1 -1
@@ -953,7 +953,7 @@ pub const USER_BOARD_COUNT_FIELD: &str = "board_count";
953 /// at zero, and absent means zero: an account older than the columns reads953 /// at zero, and absent means zero: an account older than the columns reads
954 /// exactly like a fresh one.954 /// exactly like a fresh one.
955 //955 //
956-// ponytail: that cascade ruling is also the farm's long way round — delete the956+// corner-cut: that cascade ruling is also the farm's long way round — delete the
957 // *exam* instead of the mark and the credit stands, so the loop still climbs,957 // *exam* instead of the mark and the credit stands, so the loop still climbs,
958 // at a couple of requests a point rather than two. Closing it means958 // at a couple of requests a point rather than two. Closing it means
959 // `Exam::delete`, `Homework::delete` and `Course::delete` refunding per swept959 // `Exam::delete`, `Homework::delete` and `Course::delete` refunding per swept
src/domain/appointment.rsmodified+1 -1
@@ -66,7 +66,7 @@ use crate::validate::validate_required;
66 /// touch no roster, term, event seat, or exam room, and none of those touch66 /// touch no roster, term, event seat, or exam room, and none of those touch
67 /// appointments — so they cannot deadlock. Should a future path ever need two,67 /// appointments — so they cannot deadlock. Should a future path ever need two,
68 /// take this one *last*.68 /// take this one *last*.
69-// ponytail: global lock; per-teacher locks if appointment traffic ever grows69+// corner-cut: global lock; per-teacher locks if appointment traffic ever grows
70 // enough for the contention to matter.70 // enough for the contention to matter.
71 pub(crate) static APPOINTMENT_LOCK: Mutex<()> = Mutex::const_new(());71 pub(crate) static APPOINTMENT_LOCK: Mutex<()> = Mutex::const_new(());
72 72
src/domain/cap.rsmodified+2 -2
@@ -21,7 +21,7 @@
21 //! zero, so no Rust struct carries them and no whole-row save can clobber one21 //! zero, so no Rust struct carries them and no whole-row save can clobber one
22 //! (every parent's `.content()` write is a create of a fresh row).22 //! (every parent's `.content()` write is a create of a fresh row).
23 //23 //
24-// ponytail: a counter can only drift if a future delete path forgets its24+// corner-cut: a counter can only drift if a future delete path forgets its
25 // decrement, and the boot backfill seeds most counters once rather than25 // decrement, and the boot backfill seeds most counters once rather than
26 // recomputing them. `enrollment_count` is the one that already drifted (the boot26 // recomputing them. `enrollment_count` is the one that already drifted (the boot
27 // sweep of promoted users' rows kept their seats), so it is recomputed on every27 // sweep of promoted users' rows kept their seats), so it is recomputed on every
@@ -52,7 +52,7 @@ use crate::error::AppError;
52 /// 16-racer round had one more caller told it had won than the counter agreed52 /// 16-racer round had one more caller told it had won than the counter agreed
53 /// to). The real ws server never did this in 150 rounds of the same probe.53 /// to). The real ws server never did this in 150 rounds of the same probe.
54 //54 //
55-// ponytail: one lock for every cap. Per-parent locks (a keyed map) if unrelated55+// corner-cut: one lock for every cap. Per-parent locks (a keyed map) if unrelated
56 // caps ever contend measurably — the counters are already independent, this is56 // caps ever contend measurably — the counters are already independent, this is
57 // only about how many writes a process has in flight.57 // only about how many writes a process has in flight.
58 static CLAIM_LOCK: Mutex<()> = Mutex::const_new(());58 static CLAIM_LOCK: Mutex<()> = Mutex::const_new(());
src/domain/course.rsmodified+1 -1
@@ -245,7 +245,7 @@ impl Course {
245 /// The courses `user` runs — the ones they created plus the ones a manager245 /// The courses `user` runs — the ones they created plus the ones a manager
246 /// assigned them to. A teacher's slice of the catalog.246 /// assigned them to. A teacher's slice of the catalog.
247 ///247 ///
248- /// ponytail: unpaged full table scan, and it stays one — every profile read248+ /// corner-cut: unpaged full table scan, and it stays one — every profile read
249 /// of a teacher pays it, so the ceiling is the course table's size. It249 /// of a teacher pays it, so the ceiling is the course table's size. It
250 /// cannot be indexed away on SurrealDB 3.2.3: an index on `creator` alone250 /// cannot be indexed away on SurrealDB 3.2.3: an index on `creator` alone
251 /// leaves the `OR` a `TableScan` (EXPLAIN), and the per-element index the251 /// leaves the `OR` a `TableScan` (EXPLAIN), and the per-element index the
src/domain/exam_attempt.rsmodified+1 -1
@@ -424,7 +424,7 @@ impl ExamAttempt {
424 /// `swap_remove`s errored slots, so a fixed slot read is meaningless once424 /// `swap_remove`s errored slots, so a fixed slot read is meaningless once
425 /// anything failed.425 /// anything failed.
426 //426 //
427- // ponytail: the count and a concurrent `CREATE exam_attempt` are still not427+ // corner-cut: the count and a concurrent `CREATE exam_attempt` are still not
428 // serialized against each other — SurrealDB does not conflict-check a428 // serialized against each other — SurrealDB does not conflict-check a
429 // cross-record count (the write skew `domain::cap` exists for), so an429 // cross-record count (the write skew `domain::cap` exists for), so an
430 // attempt landing in the same instant as an edit can still interleave430 // attempt landing in the same instant as an edit can still interleave
src/domain/homework_result.rsmodified+1 -1
@@ -140,7 +140,7 @@ impl HomeworkResult {
140 /// its own, and the two leases are mutually exclusive in the one process140 /// its own, and the two leases are mutually exclusive in the one process
141 /// this backend runs as, so the interleaving never gets a window.141 /// this backend runs as, so the interleaving never gets a window.
142 //142 //
143- // ponytail: that makes the freeze depend on lock discipline at the call143+ // corner-cut: that makes the freeze depend on lock discipline at the call
144 // sites, not on this row. Moving a student write's lease to *after* its144 // sites, not on this row. Moving a student write's lease to *after* its
145 // database write — or sharding HOMEWORK_LOCK per homework — reopens the145 // database write — or sharding HOMEWORK_LOCK per homework — reopens the
146 // window with nothing to catch it. Closing it in the domain layer needs a146 // window with nothing to catch it. Closing it in the domain layer needs a
src/domain/menu.rsmodified+1 -1
@@ -32,7 +32,7 @@ use crate::error::{AppError, ValidationError};
32 /// slot-removal guard: those went to conditional single-record writes32 /// slot-removal guard: those went to conditional single-record writes
33 /// ([`crate::domain::cap`]), which the store decides as this lock cannot.33 /// ([`crate::domain::cap`]), which the store decides as this lock cannot.
34 //34 //
35-// ponytail: the dish cap therefore rests on this lock alone — a dish write35+// corner-cut: the dish cap therefore rests on this lock alone — a dish write
36 // added without taking it reopens the count-then-write hole silently. Closing36 // added without taking it reopens the count-then-write hole silently. Closing
37 // it properly is another `cap` counter (`dish_count` on the menu row) plus its37 // it properly is another `cap` counter (`dish_count` on the menu row) plus its
38 // backfill; the ceiling is 51 dishes on a menu, not money or a seat, so it was38 // backfill; the ceiling is 51 dishes on a menu, not money or a seat, so it was
src/domain/payment_ledger.rsmodified+1 -1
@@ -582,7 +582,7 @@ impl PaymentLedger {
582 /// recorded, so a line that is *already* over the ceiling (written before582 /// recorded, so a line that is *already* over the ceiling (written before
583 /// it existed) still reads, still refunds through its own children, and is583 /// it existed) still reads, still refunds through its own children, and is
584 /// still reversible. Only a fresh line applied to *it* is turned away.584 /// still reversible. Only a fresh line applied to *it* is turned away.
585- // ponytail: one query per line, ceiling MAX_LEDGER_APPLIED_LINES; fold the585+ // corner-cut: one query per line, ceiling MAX_LEDGER_APPLIED_LINES; fold the
586 // walk into one recursive statement if that ceiling ever has to rise.586 // walk into one recursive statement if that ceiling ever has to rise.
587 async fn applied_to(target: &PaymentLedger, db: &Database) -> Result<i64, AppError> {587 async fn applied_to(target: &PaymentLedger, db: &Database) -> Result<i64, AppError> {
588 let mut total = 0i64;588 let mut total = 0i64;
src/domain/session_attendance.rsmodified+2 -2
@@ -178,7 +178,7 @@ impl SessionAttendance {
178 /// Both are floored/guarded rather than trusting the column to exist: a row178 /// Both are floored/guarded rather than trusting the column to exist: a row
179 /// written before these columns carries none of them.179 /// written before these columns carries none of them.
180 //180 //
181- // ponytail: that asymmetry leaves a teacher able to inflate a *student's*181+ // corner-cut: that asymmetry leaves a teacher able to inflate a *student's*
182 // attendance with future-dated lessons. Closing it needs the credit stamped182 // attendance with future-dated lessons. Closing it needs the credit stamped
183 // on the roll-call row itself and refunded off that stamp — the same column183 // on the roll-call row itself and refunded off that stamp — the same column
184 // the live-role note on `remove` below wants, and the shape184 // the live-role note on `remove` below wants, and the shape
@@ -306,7 +306,7 @@ impl SessionAttendance {
306 ///306 ///
307 /// Sound to re-send: neither statement can answer "already exists".307 /// Sound to re-send: neither statement can answer "already exists".
308 //308 //
309- // ponytail: both ends read the *live* role, so a student promoted between309+ // corner-cut: both ends read the *live* role, so a student promoted between
310 // being marked present and having that row corrected leaves the counter one310 // being marked present and having that row corrected leaves the counter one
311 // high (the credit landed as a student, the refund is refused as staff).311 // high (the credit landed as a student, the refund is refused as staff).
312 // Upgrade path is stamping the credit on the roll-call row itself and312 // Upgrade path is stamping the credit on the roll-call row itself and
src/main.rsmodified+1 -1
@@ -73,7 +73,7 @@ fn keepalive(db: Database, health: DbHealth) {
73 std::time::Duration::from_secs(hezarfen_backend::constant::DB_PING_TIMEOUT_SECS);73 std::time::Duration::from_secs(hezarfen_backend::constant::DB_PING_TIMEOUT_SECS);
74 loop {74 loop {
75 interval.tick().await;75 interval.tick().await;
76- // ponytail: an abandoned ping stays queued in the SDK and replays76+ // corner-cut: an abandoned ping stays queued in the SDK and replays
77 // when the socket heals, so a long outage lands a burst of no-op77 // when the socket heals, so a long outage lands a burst of no-op
78 // `RETURN 1`s on recovery. Harmless; probe over a raw TCP dial78 // `RETURN 1`s on recovery. Harmless; probe over a raw TCP dial
79 // instead if that burst ever shows up in a profile.79 // instead if that burst ever shows up in a profile.
src/migration_sql.rsmodified+1 -1
@@ -1379,7 +1379,7 @@ pub const BACKFILL: &str = "
1379 -- withdrawal exactly what the seed credited it. Absolute like every SET1379 -- withdrawal exactly what the seed credited it. Absolute like every SET
1380 -- below, so it converges on a forced re-seed.1380 -- below, so it converges on a forced re-seed.
1381 --1381 --
1382- -- ponytail: editing this block re-runs it (the fingerprint gate), and unlike1382+ -- corner-cut: editing this block re-runs it (the fingerprint gate), and unlike
1383 -- the board sweep above this one is only *mostly* re-runnable. Every SET is1383 -- the board sweep above this one is only *mostly* re-runnable. Every SET is
1384 -- absolute, so a re-run converges on the rows that exist — but two of the1384 -- absolute, so a re-run converges on the rows that exist — but two of the
1385 -- counters are lifetime tallies the request path never decrements while the1385 -- counters are lifetime tallies the request path never decrements while the
src/rate_limit.rsmodified+2 -2
@@ -290,7 +290,7 @@ impl<K: Eq + Hash> RateLimiter<K> {
290 290
291 // Only a *new* key can grow the map, so only a new key pays for a sweep291 // Only a *new* key can grow the map, so only a new key pays for a sweep
292 // — a client already in there stays one hash lookup, saturated or not.292 // — a client already in there stays one hash lookup, saturated or not.
293- // ponytail: while the map is saturated every new key still pays one293+ // corner-cut: while the map is saturated every new key still pays one
294 // O(n) scan. Ceiling: it takes 10k live exhausted clients to get there294 // O(n) scan. Ceiling: it takes 10k live exhausted clients to get there
295 // and the scan is the attacker's own request. Upgrade path: keep the295 // and the scan is the attacker's own request. Upgrade path: keep the
296 // earliest `window_start` beside the map and skip the scan until then.296 // earliest `window_start` beside the map and skip the scan until then.
@@ -495,7 +495,7 @@ async fn sync_once<K: Eq + Hash + Clone + std::fmt::Display>(
495 // before it began. Only a bucket that has never synced owes495 // before it began. Only a bucket that has never synced owes
496 // its whole count, having been billed nowhere yet.496 // its whole count, having been billed nowhere yet.
497 //497 //
498- // ponytail: admits between the boundary and this round land498+ // corner-cut: admits between the boundary and this round land
499 // on the old row. Ceiling: RATE_SYNC_INTERVAL_SECS of one499 // on the old row. Ceiling: RATE_SYNC_INTERVAL_SECS of one
500 // client's traffic, charged once either way. Upgrade path:500 // client's traffic, charged once either way. Upgrade path:
501 // stamp each admit with its epoch.501 // stamp each admit with its epoch.
src/web/appointments.rsmodified+1 -1
@@ -373,7 +373,7 @@ async fn publish_slots(
373 /// people who published bookable time. Same for the `teacher` / `proposed_by` /373 /// people who published bookable time. Same for the `teacher` / `proposed_by` /
374 /// `decided_by` refs on a booking. Pinned by374 /// `decided_by` refs on a booking. Pinned by
375 /// `tests/regress_appointments.rs::a_parent_reads_the_slot_teachers_identity`.375 /// `tests/regress_appointments.rs::a_parent_reads_the_slot_teachers_identity`.
376-// ponytail: occupancy would be one query per slot with today's domain API; a376+// corner-cut: occupancy would be one query per slot with today's domain API; a
377 // batch "live bookings for these slots" read would let the list carry it.377 // batch "live bookings for these slots" read would let the list carry it.
378 #[utoipa::path(378 #[utoipa::path(
379 get,379 get,
src/web/board_ws.rsmodified+2 -2
@@ -267,7 +267,7 @@ async fn forward(
267 // it published them: only the head can match, which keeps the check O(1)267 // it published them: only the head can match, which keeps the check O(1)
268 // and cannot swallow someone else's mark that happens to be next.268 // and cannot swallow someone else's mark that happens to be next.
269 //269 //
270- // ponytail: that ordering is an unenforced coupling — the head only ever270+ // corner-cut: that ordering is an unenforced coupling — the head only ever
271 // matches because `mine.push_back` immediately precedes `publish` in271 // matches because `mine.push_back` immediately precedes `publish` in
272 // `handle_message`, on a loop that is single-threaded per socket. Separate272 // `handle_message`, on a loop that is single-threaded per socket. Separate
273 // those two lines (or publish from anywhere else) and this socket starts273 // those two lines (or publish from anywhere else) and this socket starts
@@ -289,7 +289,7 @@ async fn forward(
289 // tick noticed. Re-derived against the database, never read off the frame:289 // tick noticed. Re-derived against the database, never read off the frame:
290 // the frame is the prompt, the row is the authority.290 // the frame is the prompt, the row is the authority.
291 //291 //
292- // ponytail: that is one `live_board` (two reads) per forwarded frame, paid292+ // corner-cut: that is one `live_board` (two reads) per forwarded frame, paid
293 // by every listening socket, where the fan-out used to be read-free — a293 // by every listening socket, where the fan-out used to be read-free — a
294 // busy board now multiplies its database traffic by the size of the room.294 // busy board now multiplies its database traffic by the size of the room.
295 // The drawer's own echo is dropped above without paying it, which is the295 // The drawer's own echo is dropped above without paying it, which is the
src/web/exam_ws.rsmodified+2 -2
@@ -95,7 +95,7 @@ const ROOM: &str = "exam room";
95 /// refused). The count this pairs with lives in *this* process's memory95 /// refused). The count this pairs with lives in *this* process's memory
96 /// ([`crate::state::ExamPresence`]), so process-wide is exactly the right96 /// ([`crate::state::ExamPresence`]), so process-wide is exactly the right
97 /// scope: there is no room state anywhere else to serialize against.97 /// scope: there is no room state anywhere else to serialize against.
98-// ponytail: global lock, per-attempt locks if room churn ever shows up in a98+// corner-cut: global lock, per-attempt locks if room churn ever shows up in a
99 // profile.99 // profile.
100 static PRESENCE_LOCK: tokio::sync::Mutex<()> = tokio::sync::Mutex::const_new(());100 static PRESENCE_LOCK: tokio::sync::Mutex<()> = tokio::sync::Mutex::const_new(());
101 101
@@ -386,7 +386,7 @@ async fn handle_message(
386 // like `save_answer_checked` — and dropped before the socket386 // like `save_answer_checked` — and dropped before the socket
387 // sends, so a slow client never stalls a writer.387 // sends, so a slow client never stalls a writer.
388 //388 //
389- // ponytail (accepted race, reviewed): the room's sitting was389+ // corner-cut (accepted race, reviewed): the room's sitting was
390 // chosen at join, before any lease, so no lock scope can help — a390 // chosen at join, before any lease, so no lock scope can help — a
391 // save can land on it just after a retake made it terminal. It391 // save can land on it just after a retake made it terminal. It
392 // writes a history row for the old seq; the grade of record (latest392 // writes a history row for the old seq; the grade of record (latest
src/web/exams/mod.rsmodified+2 -2
@@ -96,7 +96,7 @@ impl Scheduled for Exam {
96 /// the subject's own reference counter96 /// the subject's own reference counter
97 /// ([`crate::domain::subject::Subject::delete`]), which every question create,97 /// ([`crate::domain::subject::Subject::delete`]), which every question create,
98 /// re-tag and delete moves.98 /// re-tag and delete moves.
99-// ponytail: global RwLock, shard per-exam if save latency ever matters.99+// corner-cut: global RwLock, shard per-exam if save latency ever matters.
100 pub(crate) static EXAM_LOCK: tokio::sync::RwLock<()> = tokio::sync::RwLock::const_new(());100 pub(crate) static EXAM_LOCK: tokio::sync::RwLock<()> = tokio::sync::RwLock::const_new(());
101 101
102 pub fn routes() -> OpenApiRouter<AppState> {102 pub fn routes() -> OpenApiRouter<AppState> {
@@ -605,7 +605,7 @@ async fn delete_exam(
605 // an image row written after that snapshot would strand its bytes on disk605 // an image row written after that snapshot would strand its bytes on disk
606 // even though the row itself is now refused.606 // even though the row itself is now refused.
607 //607 //
608- // ponytail: process-local, so it holds because the deployment is a single608+ // corner-cut: process-local, so it holds because the deployment is a single
609 // replica with stop-the-world deploys (two overlapping binaries would609 // replica with stop-the-world deploys (two overlapping binaries would
610 // reopen it). Closing it in the store means the `cap` shape the counter610 // reopen it). Closing it in the store means the `cap` shape the counter
611 // work already sketched: `claim_and_create` gaining a second record to611 // work already sketched: `claim_and_create` gaining a second record to
src/web/homework.rsmodified+1 -1
@@ -78,7 +78,7 @@ use super::{
78 ///78 ///
79 /// Lock order, where both are taken: `HOMEWORK_LOCK` before the counter lock in79 /// Lock order, where both are taken: `HOMEWORK_LOCK` before the counter lock in
80 /// [`crate::domain::cap`], never the reverse.80 /// [`crate::domain::cap`], never the reverse.
81-// ponytail: global RwLock, shard per-homework if write latency ever matters.81+// corner-cut: global RwLock, shard per-homework if write latency ever matters.
82 pub(crate) static HOMEWORK_LOCK: tokio::sync::RwLock<()> = tokio::sync::RwLock::const_new(());82 pub(crate) static HOMEWORK_LOCK: tokio::sync::RwLock<()> = tokio::sync::RwLock::const_new(());
83 83
84 pub fn routes() -> OpenApiRouter<AppState> {84 pub fn routes() -> OpenApiRouter<AppState> {
tests/e2e.rsmodified+1 -1
@@ -2468,7 +2468,7 @@ async fn a_lagged_socket_resyncs_to_exactly_what_the_database_holds() {
2468 // between the two ends swallowed ~1200 frames on this machine before the2468 // between the two ends swallowed ~1200 frames on this machine before the
2469 // room's writer stalled, and only then does the 256-frame channel start2469 // room's writer stalled, and only then does the 256-frame channel start
2470 // dropping — so the count carries roughly 2x the measured margin.2470 // dropping — so the count carries roughly 2x the measured margin.
2471- // ponytail: a host with `net.ipv4.tcp_wmem` tuned far past the 4 MB2471+ // corner-cut: a host with `net.ipv4.tcp_wmem` tuned far past the 4 MB
2472 // default could buffer more than this and the lag would stop being2472 // default could buffer more than this and the lag would stop being
2473 // forced; the test would then pass vacuously up to the resync assert,2473 // forced; the test would then pass vacuously up to the resync assert,
2474 // which fails loudly rather than silently.2474 // which fails loudly rather than silently.
tests/integration.rsmodified+1 -1
@@ -5192,7 +5192,7 @@ async fn admin_manages_roles_with_guards() {
5192 /// The only other `create_with_role` caller is the out-of-band admin bootstrap5192 /// The only other `create_with_role` caller is the out-of-band admin bootstrap
5193 /// (`src/domain/user.rs:426`, hardcoded `Role::Admin`, behind no route).5193 /// (`src/domain/user.rs:426`, hardcoded `Role::Admin`, behind no route).
5194 ///5194 ///
5195-/// ponytail: that funnel list is grep-verified, not machine-enforced — a *new*5195+/// corner-cut: that funnel list is grep-verified, not machine-enforced — a *new*
5196 /// route writing an arbitrary role string would slip past this test. Upgrade5196 /// route writing an arbitrary role string would slip past this test. Upgrade
5197 /// path: derive the surface list from the emitted OpenAPI, the way the auth-gate5197 /// path: derive the surface list from the emitted OpenAPI, the way the auth-gate
5198 /// test derives its protected-path set.5198 /// test derives its protected-path set.