Commit 0486ebc
authored
fix(driver-diagnostic): publish the record exclusively at 0600, and delete five unreachable items (#502)
The diagnostic publisher was the only one of the ten publication helpers
in the tree that used `File::create` on a *predictable* temp name in an
agent-writable directory: no `O_EXCL`, no mode, symlink-followable, and
no parent-directory fsync — while its sibling in `delivery_ledger`
documents exactly why each of those matters. Four defects, one fix: the
staging sibling is now created exclusively at `0600` under
`.driver-diagnostic.tmp-<pid>-<counter>`, so a planted symlink is refused
instead of followed, the record is not world-readable, two writes to one
agent directory cannot collide, and the directory entry is synced.
Pinned by `a_planted_staging_symlink_is_refused_and_the_record_is_owner_only`.
T1-DEAD, each verified by an exhaustive search over `src`, `tests` and
`crates`:
- `pretrust::pretrust_codex` — 0 callers; its own doc says reconciliation
does not call it. The live entry is `pretrust_codex_at`.
- `context::append_decision` — a one-line forwarder with no production
caller; the CLI already calls `append_decision_to_dir`. Its 5 unit-test
callers now call that directly.
- `agent_author::resource::add_resource` — an 8-argument forwarder
superseded by `add_resource_with_selector`, which production already
uses. Its 17 unit-test callers pass the `None` the forwarder passed.
- `identity::AddressBookEntry::bus_address` — 0 callers. Every other
`bus_address` in the tree is `AgentSpec::bus_address(this_host)`, a
different method with an argument.
- `ding::observed_poke` — the repo's only `#[allow(dead_code)]` in `src`,
superseded by `observed_poke_with_window`.
- `resource_profile::relative_path` — 0 callers anywhere. The deep-clean
report filed it as test-only; it is dead.
Narrowed only where it is warning-free: `CodexHoldReason` and
`CodexTerminalError` to `pub(crate)`, and the two codex control-state
loaders to `#[cfg(test)]`. Narrowing the other five codex items and
`resource_profile::last_commit` wakes `dead_code` on their test-only
accessors, which is exactly why they are `pub` today — reverted rather
than papered over with an allow.
Also: `hooks::tests::omp_launch_classification_is_exact` carried a
duplicated `#[test]` and, above it, the doc comment belonging to the pi
test whose `#[test]` was missing (#501 restored that). Attribute
de-duplicated, doc moved to the test it describes.
agent-identity: dev3.direct.omp.43sz6ujq
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.1.7
agent-runtime: OMP 18.1.7
tooling-profile: dotfiles@39a19af1 parent e58f9f7 commit 0486ebc
10 files changed
Lines changed: 152 additions & 103 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1263 | 1263 | | |
1264 | 1264 | | |
1265 | 1265 | | |
1266 | | - | |
| 1266 | + | |
1267 | 1267 | | |
1268 | 1268 | | |
1269 | 1269 | | |
| |||
1272 | 1272 | | |
1273 | 1273 | | |
1274 | 1274 | | |
| 1275 | + | |
1275 | 1276 | | |
1276 | 1277 | | |
1277 | 1278 | | |
1278 | 1279 | | |
1279 | 1280 | | |
1280 | 1281 | | |
1281 | | - | |
| 1282 | + | |
1282 | 1283 | | |
1283 | 1284 | | |
1284 | 1285 | | |
| |||
1287 | 1288 | | |
1288 | 1289 | | |
1289 | 1290 | | |
| 1291 | + | |
1290 | 1292 | | |
1291 | 1293 | | |
1292 | 1294 | | |
1293 | 1295 | | |
1294 | 1296 | | |
1295 | 1297 | | |
1296 | | - | |
| 1298 | + | |
1297 | 1299 | | |
1298 | 1300 | | |
1299 | 1301 | | |
| |||
1302 | 1304 | | |
1303 | 1305 | | |
1304 | 1306 | | |
| 1307 | + | |
1305 | 1308 | | |
1306 | 1309 | | |
1307 | 1310 | | |
| |||
1311 | 1314 | | |
1312 | 1315 | | |
1313 | 1316 | | |
1314 | | - | |
| 1317 | + | |
1315 | 1318 | | |
1316 | 1319 | | |
1317 | 1320 | | |
| |||
1320 | 1323 | | |
1321 | 1324 | | |
1322 | 1325 | | |
| 1326 | + | |
1323 | 1327 | | |
1324 | 1328 | | |
1325 | 1329 | | |
| |||
1345 | 1349 | | |
1346 | 1350 | | |
1347 | 1351 | | |
1348 | | - | |
| 1352 | + | |
1349 | 1353 | | |
1350 | 1354 | | |
1351 | 1355 | | |
| |||
1354 | 1358 | | |
1355 | 1359 | | |
1356 | 1360 | | |
| 1361 | + | |
1357 | 1362 | | |
1358 | 1363 | | |
1359 | 1364 | | |
| |||
1379 | 1384 | | |
1380 | 1385 | | |
1381 | 1386 | | |
1382 | | - | |
| 1387 | + | |
1383 | 1388 | | |
1384 | 1389 | | |
1385 | 1390 | | |
| |||
1388 | 1393 | | |
1389 | 1394 | | |
1390 | 1395 | | |
| 1396 | + | |
1391 | 1397 | | |
1392 | 1398 | | |
1393 | 1399 | | |
| |||
1405 | 1411 | | |
1406 | 1412 | | |
1407 | 1413 | | |
1408 | | - | |
| 1414 | + | |
1409 | 1415 | | |
1410 | 1416 | | |
1411 | 1417 | | |
| |||
1414 | 1420 | | |
1415 | 1421 | | |
1416 | 1422 | | |
| 1423 | + | |
1417 | 1424 | | |
1418 | 1425 | | |
1419 | | - | |
| 1426 | + | |
1420 | 1427 | | |
1421 | 1428 | | |
1422 | 1429 | | |
| |||
1425 | 1432 | | |
1426 | 1433 | | |
1427 | 1434 | | |
| 1435 | + | |
1428 | 1436 | | |
1429 | 1437 | | |
1430 | 1438 | | |
| |||
1461 | 1469 | | |
1462 | 1470 | | |
1463 | 1471 | | |
1464 | | - | |
| 1472 | + | |
1465 | 1473 | | |
1466 | 1474 | | |
1467 | 1475 | | |
| |||
1470 | 1478 | | |
1471 | 1479 | | |
1472 | 1480 | | |
| 1481 | + | |
1473 | 1482 | | |
1474 | 1483 | | |
1475 | | - | |
| 1484 | + | |
1476 | 1485 | | |
1477 | 1486 | | |
1478 | 1487 | | |
| |||
1481 | 1490 | | |
1482 | 1491 | | |
1483 | 1492 | | |
| 1493 | + | |
1484 | 1494 | | |
1485 | 1495 | | |
1486 | 1496 | | |
| |||
1561 | 1571 | | |
1562 | 1572 | | |
1563 | 1573 | | |
1564 | | - | |
| 1574 | + | |
1565 | 1575 | | |
1566 | 1576 | | |
1567 | 1577 | | |
| |||
1570 | 1580 | | |
1571 | 1581 | | |
1572 | 1582 | | |
| 1583 | + | |
1573 | 1584 | | |
1574 | 1585 | | |
1575 | 1586 | | |
1576 | 1587 | | |
1577 | | - | |
| 1588 | + | |
1578 | 1589 | | |
1579 | 1590 | | |
1580 | 1591 | | |
| |||
1583 | 1594 | | |
1584 | 1595 | | |
1585 | 1596 | | |
| 1597 | + | |
1586 | 1598 | | |
1587 | 1599 | | |
1588 | 1600 | | |
| |||
1595 | 1607 | | |
1596 | 1608 | | |
1597 | 1609 | | |
1598 | | - | |
| 1610 | + | |
1599 | 1611 | | |
1600 | 1612 | | |
1601 | 1613 | | |
| |||
1604 | 1616 | | |
1605 | 1617 | | |
1606 | 1618 | | |
| 1619 | + | |
1607 | 1620 | | |
1608 | 1621 | | |
1609 | 1622 | | |
| |||
1625 | 1638 | | |
1626 | 1639 | | |
1627 | 1640 | | |
1628 | | - | |
| 1641 | + | |
1629 | 1642 | | |
1630 | 1643 | | |
1631 | 1644 | | |
| |||
1634 | 1647 | | |
1635 | 1648 | | |
1636 | 1649 | | |
| 1650 | + | |
1637 | 1651 | | |
1638 | 1652 | | |
1639 | 1653 | | |
| |||
1647 | 1661 | | |
1648 | 1662 | | |
1649 | 1663 | | |
1650 | | - | |
| 1664 | + | |
1651 | 1665 | | |
1652 | 1666 | | |
1653 | 1667 | | |
| |||
1656 | 1670 | | |
1657 | 1671 | | |
1658 | 1672 | | |
| 1673 | + | |
1659 | 1674 | | |
1660 | 1675 | | |
1661 | 1676 | | |
| |||
1672 | 1687 | | |
1673 | 1688 | | |
1674 | 1689 | | |
1675 | | - | |
| 1690 | + | |
1676 | 1691 | | |
1677 | 1692 | | |
1678 | 1693 | | |
| |||
1681 | 1696 | | |
1682 | 1697 | | |
1683 | 1698 | | |
| 1699 | + | |
1684 | 1700 | | |
1685 | 1701 | | |
1686 | 1702 | | |
| |||
1691 | 1707 | | |
1692 | 1708 | | |
1693 | 1709 | | |
1694 | | - | |
| 1710 | + | |
1695 | 1711 | | |
1696 | 1712 | | |
1697 | 1713 | | |
| |||
1700 | 1716 | | |
1701 | 1717 | | |
1702 | 1718 | | |
| 1719 | + | |
1703 | 1720 | | |
1704 | 1721 | | |
1705 | 1722 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 42 | | |
67 | 43 | | |
68 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| |||
3002 | 3002 | | |
3003 | 3003 | | |
3004 | 3004 | | |
3005 | | - | |
| 3005 | + | |
| 3006 | + | |
3006 | 3007 | | |
3007 | 3008 | | |
3008 | 3009 | | |
| |||
3025 | 3026 | | |
3026 | 3027 | | |
3027 | 3028 | | |
3028 | | - | |
| 3029 | + | |
| 3030 | + | |
3029 | 3031 | | |
3030 | 3032 | | |
3031 | 3033 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | 125 | | |
133 | 126 | | |
134 | 127 | | |
| |||
285 | 278 | | |
286 | 279 | | |
287 | 280 | | |
288 | | - | |
289 | | - | |
| 281 | + | |
| 282 | + | |
290 | 283 | | |
291 | 284 | | |
292 | 285 | | |
293 | 286 | | |
294 | 287 | | |
295 | | - | |
| 288 | + | |
296 | 289 | | |
297 | 290 | | |
298 | 291 | | |
| |||
315 | 308 | | |
316 | 309 | | |
317 | 310 | | |
318 | | - | |
319 | | - | |
320 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
321 | 314 | | |
322 | 315 | | |
0 commit comments