Skip to content

fix: close a child's questions when its parent answers by bell - #2470

Merged
yansfil merged 1 commit into
mainfrom
fix/open-asks-judgment
Nov 12, 2026
Merged

yansfil merged 1 commit into
mainfrom
fix/open-asks-judgment

Conversation

@yansfil

@yansfil yansfil commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Summary

A delegated agent's open questions (나를 기다리는 것) stayed open after its parent had already answered them in a letter.
Hide is meant to close a child's earlier questions when its parent sends a reply or request letter (B12), but it never matched the parent.
The bell line names the writer by the name a person knows it by (its registered name, else its pane's title), while the child's lineage names the parent by its wire name (agent-32039); for every parent registered without a name, every Conductor, the two never matched.
The bell record now also carries the writer's wire name and the letter's kind, the judged message keeps them, and the answer check compares wire name with wire name.
On the operator's ledger copy, 15 of 20 hand-labelled stale questions would have closed this way (17 counting two letters too old for the delivery ledger to show their sender).

Review

  • Decide: a parent's request letter closes every earlier question of its child, and the turn's judgment lists again the ones still waiting (documented B12, now working). On the labelled sample this also closes 2 of 3 live questions (both a person's own step) unless the judgment lists them again; the stacked follow-up keeps a person's step from closing on a parent's letter.
  • Risky files: hide-core/src/delivery/doorbell.rs - the bell is recorded under the runtime lock as before, with one more owned string; hide-core/src/labels/facts.rs - the verdict saved in labels.json gains an optional field (old records read with none).
  • Cost: one wire_name lookup over the pass's ledger copy per bell typed; no new work per input or tick.

Tests

  • Layer: unit, in the label worker (labels/tests.rs), driving real session files, the real bell line (delivery::bell::line) and the bell record, and reading the TurnEnd the ledger receives.
  • Catches: a parent matched by the name the line shows. Planting the old comparison fails it: [true, false, false, false, true] against [true, true, false, false, false], which also shows the old code took an impostor whose line showed the parent's name.
  • Repeat: the new test 5 times locally, all green.
  • Waits: none new; the existing settle helper.

Evidence

  • Verified: labels::, doorbell and open_ask tests, 271 run, 271 passed; clippy -D warnings on hide-core all targets; fmt.
  • Verified: root cause reproduced on the operator's ledger copy (session 1c86d7, letter at offset 3421468: parent agent-32039, line sender hide 앱 모바일 출시 계획); the same parent appeared under three titles in one day.
  • Not verified: no live run against an installed build; the full Rust suite and the other lanes run in CI only.
  • Not verified: the measured effect is a simulation over a copy of the ledger with the delivery ledger's sender names, not a replay through the judgment.
Measured on the labelled sample (41 open questions of 11-11/12 with later turns; 20 stale, 3 live by hand)
before after
stale closed by a parent's reply/request 0/20 15/20 (17 with two letters older than the delivery ledger keeps)
live closed before the judgment lists them again 0/3 2/3 (778191: approval, App Store Connect details)
roots with no operator answer (#5, #37, #40) open open: not certain, left to the stacked fold

Needs You is unchanged: a delegated row carries no questions, and a root's hold still ends only on the operator's own message.

Verification record

Base adb0f56. Suites: nextest -p hide-core filtered labels::, doorbell, open_ask (271/271); clippy -p hide-core --all-targets -D warnings; check-no-workstation-identity.sh, check-no-attribution.py, check-timed-waits.py.

The doorbell records a letter's writer by the name its line shows, the
parent's registered name or pane title, while a delegated session's
lineage names its parent by its wire name. A parent registered without a
name, every Conductor, never matched, so its reply or request never
closed what its child asked and the record's open questions piled up.

The bell record now carries the writer's wire name and the letter's kind,
the judged message keeps them, and the turn's answer check compares the
lineage's parent with that wire name instead of re-reading the bounded
bell memory.
@yansfil
yansfil added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 0187560 Nov 12, 2026
41 checks passed
@yansfil
yansfil deleted the fix/open-asks-judgment branch November 12, 2026 01:28
HyunjunJeon pushed a commit to HyunjunJeon/hide that referenced this pull request Nov 12, 2026
… open (with-hide#2473)

Related: follows with-hide#2470 and with-hide#2469 (both merged). Paired private docs:
with-hide/hide-private#879.

## Summary

Some questions in `나를 기다리는 것` were settled without anyone answering them
in the session. Another agent relayed the operator's decision, or the
agent did the thing itself. They stayed open anyway and kept the task in
Needs You.
Hide AI may now fold such a question, never delete it. It moves under
`정리됨 N` below the list, with a one-line reason, and one press of `다시 열기`
brings it back for good.
A step only the operator can take (sign-in, approval, permission, typed
information) is marked when the question is listed. Hide AI never folds
it, and a parent's letter no longer closes it; only the operator's own
answer does.
Questions recorded before this change carry no mark and are never
folded.

![정리됨 opened (dark): each folded question with Hide AI's reason and 다시
열기](https://github.com/yansfil/pr-assets/blob/main/hide/feat-fold-open-asks/771e64d/folded-open-dark.png?raw=true)
Look at the lines under `정리됨 2`: the question in the subtle colour, the
reason under it, `다시 열기` at the right.

## Review

- **Decide**: an approval the agent reserves for the operator ("only
your OK is left") counts as the operator's own step, so it never folds.
On the sample this keeps one settled merge question (fc86b2) in Needs
You.
- **Decide**: the fold is shown closed as `정리됨 N` under `나를 기다리는 것`,
only in the session record; rows and the pane head ignore folded lines.
- **Risky files**: `hide-core/src/links/ledger_store.rs` - the close and
fold updates in one turn-end transaction; schema 16 adds two nullable
columns to `ledger_missed`.
- **Risky files**: `hide-core/src/labels/context_label.rs` - END prompt
v27 adds `operator_only` on each missed item and `reason` on each
resolved id.
- **Cost**: no new model call. The existing END call returns two more
fields, and the turn-end write runs one more UPDATE.

## Tests

- **Layer**: unit, against the real ledger store
(`links/ledger_store_tests.rs`), plus a vitest render of the session
record.
- **Fixture**: the e2e stand-in provider now answers every missed line
with `operator_only: false` and every resolution with `reason: ""`
(`web/e2e/pane-fixture.ts`); without them the v27 schema refused its
answers and the session-record e2e tests saw no questions.
- **Catches**: a parent's letter closing the operator's own step; a fold
of an unmarked or operator-only line; a reopened line folding again.
Dropping the `operator_only` guard from the parent-answer close (closing
every line) fails both new ledger tests.
- **Repeat**: the two new ledger tests and with-hide#2470's bell test 5 times
locally, all green.
- **Waits**: none.

## Evidence

- **Verified**: `verify` green on 1ff2732 (all lanes, web e2e Linux
6/6 and Windows, desktop e2e Windows). The first run's e2e reds were the
stand-in answers the v27 schema refused, fixed in the fixture.
- **Verified**: after merging main (with-hide#2469 included): `hide-core`
filtered nextest 350/350; web typecheck, lint, and vitest for
SessionRecord, agentRow, PaneHeaderBand and i18n (159/159); design
contract.
- **Verified**: the v27 prompt on haiku, with production flags, over the
hand-labelled sample. The person-step mark caught 3 of 3 operator steps
and wrongly marked 2 of 12 other questions. That error leaves a question
held, never closed.
- **Not verified**: no run on an installed build. The measurement
rebuilds each turn from the session file (last 3,500 characters, at most
5 later turns), and 9 questions were not listed again in that context.
- **Not verified**: the full Rust suite and the other lanes run in CI
only. `verify-web.sh`'s install step is refused locally by pnpm 12
(ignored build scripts), so its steps were run one by one.

<details><summary>Measured on the labelled sample (open questions of
11-11/12 with later turns: 20 stale, 3 live, labelled by hand)</summary>

| | stale cleared | live lost |
| --- | --- | --- |
| before (with-hide#2470 not merged) | 0/20 | 0/3 |
| with-hide#2470's rule alone, no relisting | 15/20 | 2/3 (both operator steps) |
| with-hide#2470 + this, v27 judgment (one run) | 8/20 (7 closed, 1 folded) | 0/3
|

Needs You over the 16 root sessions holding questions of 11-11/12, at
the copy's last turn:

| | Needs You | false | live lost |
| --- | --- | --- | --- |
| before | 16 | 2 (fc86b2, dfc3c6), f89171 unclear | 0 |
| after | 16 | 2 (fc86b2, dfc3c6), f89171 unclear | 0 |

- fc86b2: the judgment read it as settled with a reason on 3 turns
("with-hide#2402 already merged"), but the agent had reserved the merge OK for
the operator, so the mark keeps it.
- dfc3c6: the judgment lists it again as still waiting on all 5 later
turns; nothing in the session settles it.
- A narrower mark (excluding merge decisions) was tried. It still marked
fc86b2 and missed the 9 GB delete permission, so it was not kept.

</details>

<details><summary>More evidence</summary>

![정리됨 closed at first (light), below 나를 기다리는
것](https://github.com/yansfil/pr-assets/blob/main/hide/feat-fold-open-asks/771e64d/folded-closed-light.png?raw=true)
Closed at first, light theme.

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant