You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: design/secondary/lang/c3/3tk-open-defects.md
+46-30Lines changed: 46 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# 3tk — open defects
2
2
3
-
**The working list for fixing the port.** Ten items — **seven fixed, one open,
3
+
**The working list for fixing the port.** Ten items — **eight fixed, zero open,
4
4
two closed**. One table, one section each: where it is, what is wrong, what the
5
5
fix is, how to know it worked, and what state it is in.
6
6
@@ -33,7 +33,7 @@ are the good ones. Re-print before trusting them again — every fix moves them.
33
33
34
34
| # | Where | What | Fix is | State |
35
35
|---|---|---|---|---|
36
-
|**P6**|`pool.c3:493`, `:563`| The pool can lose items and never know |**Ruled 2026-08-28: option 3.**`on_close` takes the queue **by value** — *I do not care what you did* — plus the wording |**ruled, built by 3TK-56.**[3tk-on-close-handoff-001.md](3tk-on-close-handoff-001.md)|
36
+
|**P6**|`pool.c3:494`, `:564`| The pool can lose items and never know |**Ruled 2026-08-28: option 3.**`on_close` takes the queue **by value** — *I do not care what you did* — plus the wording |**ruled, built by 3TK-56.**[3tk-on-close-handoff-001.md](3tk-on-close-handoff-001.md)|
37
37
|**Q5**|`mailbox.c3:124`, `pool.c3:253`| A release racing a call still in flight | Ruled 2026-08-28: stated, and checked |**fixed 2026-08-28, 3TK-53 + 3TK-54, closed by 3TK-55**|
38
38
39
39
**Six of the ten are done, on 2026-08-27, in one stage.** Every mechanical and
@@ -47,8 +47,9 @@ and they have been overtaken** — the live ones are in
47
47
pool, both 2026-08-28; 3TK-55 closed this row against the built code on the same
48
48
day, after re-running all three scripts.
49
49
50
-
**One remains open, and it is waiting on you.**`P6` needs one small ruling
51
-
before code can be written. The ruling is stated in the section.
50
+
**`P6` is the eighth, and it is done.** Ruled 2026-08-28, built 2026-08-30 by
51
+
3TK-56 — [3tk-on-close-handoff-001.md](3tk-on-close-handoff-001.md) is its
52
+
charter. Nothing remains open.
52
53
53
54
**`P7` no longer needs one.** Reading `std::thread` showed the fault it warned
54
55
about cannot occur. The branch is dead, it stays, and a plain `//` comment at
@@ -70,10 +71,11 @@ Only the open and deferred items have an order. The fixed ones are done.
70
71
71
72
**Waiting on you.**
72
73
73
-
-`P6`— one ruling, three answers, written out in its section. INTR 1 ranked it
74
-
High, and it is the last of the three it put there.
74
+
-Nothing. `P6`was the last one, ruled 2026-08-28 and built 2026-08-30 by
75
+
3TK-56.
75
76
76
-
**Nothing is waiting on a stage any more.**`Q5` was the last one, and it ran.
77
+
**Nothing is waiting on a stage any more.**`Q5` and `P6` were the last two,
78
+
and both ran.
77
79
78
80
**The dependency that is not obvious, and it is now discharged.**
79
81
@@ -112,9 +114,9 @@ every number in an earlier version of this table, is now wrong.**
112
114
**Three sites.**
113
115
114
116
```
115
-
pool.c3:493 the close hook, called with what was left after a race
116
-
pool.c3:563 the close hook, called with everything the pool held
117
-
pool.c3:526-527 one item with an identity the pool does not recognize -- RULED 2026-08-27
117
+
pool.c3:494 the close hook, called with what was left after a race
118
+
pool.c3:564 the close hook, called with everything the pool held
119
+
pool.c3:527-528 one item with an identity the pool does not recognize -- RULED 2026-08-27
118
120
```
119
121
120
122
**Re-printed 2026-08-28**, after the lifetime fix moved every line below
@@ -205,19 +207,33 @@ Documentation, not code — so that the silence is not read as a promise.
205
207
writing code. 3 is cheapest and defensible. **1 and 2 combine** — a check while
206
208
developing, a number afterwards.
207
209
208
-
**State: RULED 2026-08-28 — option 3, and it is stronger than option 3 as
209
-
written here.**`on_close` takes the queue **by value**, so the pool physically
210
-
cannot observe what the hook did and the type says so; the comment and the
211
-
reference say it in words. **Options 1 and 2 are closed for good, not deferred.**
212
-
The ruling, the five defaults that go with it and the work list are in
213
-
[3tk-on-close-handoff-001.md](3tk-on-close-handoff-001.md), which is **3TK-56's
210
+
**State: RULED 2026-08-28, BUILT 2026-08-30 by 3TK-56 — option 3, and it is
211
+
stronger than option 3 as written here.**`on_close` takes the queue **by
212
+
value**, so the pool physically cannot observe what the hook did and the type
213
+
says so; the comment and the reference say it in words. **Options 1 and 2 are
214
+
closed for good, not deferred.** The ruling, the five defaults that go with it
215
+
and the work list are in
216
+
[3tk-on-close-handoff-001.md](3tk-on-close-handoff-001.md), which was **3TK-56's
214
217
only input besides the status file.** The measurement behind it: a by-value
215
218
struct parameter is an lvalue on c3c 0.8.3, so the hook's ergonomics are
216
219
unchanged, and the caller's copy is untouched, so nothing is left to count.
220
+
`InnerQueue.take()` (`../3tk/src/queue.c3`) is the O(1) move both call sites
221
+
use.
217
222
218
-
**Superseded state: open, waiting on your decision. Nothing blocked it** — the
219
-
dependency on `Q5` is discharged, and all three options are on the table. See
220
-
[Order](#order).
223
+
**Superseded state: open, waiting on your decision.** Closed by 3TK-56.
224
+
225
+
**What 3TK-56 moved outside `3tk/src`:**
226
+
227
+
-`ref/3tk-decisions-004.md` — the `P6` entry, under `pool.c3` and `queue.c3`.
228
+
`-003` went to `backup/`.
229
+
-`ref/3tk-reference-004.md` — the `on_close` signature and its doc block, and
230
+
`InnerQueue.take()` added to the queue's operation list. Edited in place, not
231
+
versioned: this stage's charter names the file directly.
232
+
-`3tk-port-findings-004.md` — new §4a, the argument for dtk and otk. `-003`
233
+
went to `backup/`.
234
+
-`3tk/test/t_queue.c3` — one positive test, `take_empties_the_source`. No
235
+
negative is possible: a hook that keeps items dereferences nothing, so no
236
+
build can notice.
221
237
222
238
223
239
## Refuted — claims that did not survive the code
@@ -310,27 +326,27 @@ row.
310
326
311
327
## After a fix
312
328
313
-
**All the numbers below were re-measured on 2026-08-28, by 3TK-55, after 3TK-53
314
-
and 3TK-54.**
329
+
**All the numbers below were re-measured on 2026-08-30, by 3TK-56, after `P6`
330
+
was built.**
315
331
The one missing descriptor sentence is the pre-existing `inner.c3` module
316
-
summary and is not new. `ref` moved 360 to 365 on 2026-08-27 because the reference and the decisions
317
-
each took on new sentences that say *item*, and it has not moved since. `3tk/src`
318
-
went 124 to 125 with the lifetime fix's new prose.
332
+
summary and is not new. `ref` moved 365 to 366 with `take()`'s two new
333
+
sentences in the decisions entry. `3tk/src` is unchanged at 125 — `take()`'s
334
+
doc block does not say *item*.
319
335
320
336
**Every mechanical item touches `3tk/src`, so the doc loop is owed.**
321
337
`ref/3tk-doc-loop-003.md` is the procedure; `check-doc-loop.sh` says whether it
322
338
is still owed.
323
339
324
-
**`ref/3tk-decisions-003.md` is the current one**, and `-002` is in `backup/`.
325
-
`P6` will add an entry when it is ruled; `P7` closed without one.
340
+
**`ref/3tk-decisions-004.md` is the current one**, and `-003` is in `backup/`.
341
+
`P6`'s entry is in it, under `pool.c3` and `queue.c3`; `P7` closed without one.
326
342
327
-
**The numbers to re-measure**, all true on 2026-08-28 after 3TK-54:
343
+
**The numbers to re-measure**, all true on 2026-08-30 after 3TK-56:
328
344
329
345
```
330
-
./run-builds.sh # four builds green, 87 checks, 91 tests per build, 0 failures
0 commit comments