pmacs/src
Levi Neuwirth 31352692c8
fix(process): name the surface a process purpose actually reaches
`required_purpose`'s invalid-UTF-8 refusal told the caller that their
process purpose "is displayed to the user in *workers* and in the
modeline". Neither is a process surface. Stage 1 deliberately keeps
processes out of `*workers*` — which lists async JOBS — and out of the
statusline activity indicator; a process's purpose is exposed through
`pmacs.process.list` and nowhere else, and joining the two planes is
Stage 2's work (framing §3, Q#W-4).

The refusal is correct and stays: a purpose that cannot be displayed
anywhere should still be refused, and nothing spawns either way. What
was wrong is the reason given to the user, which pointed them at two
places their process will never appear. A diagnostic that misdescribes
the system is worse than a terse one, because it sends the reader
looking in the wrong place.

The job-side twin diverges rather than converging. `_push_dispatch_name`
refuses a non-UTF-8 handler name for the same reason, and there
`*workers*` and the modeline are the RIGHT answer — the name is composed
into every job's purpose and a job renders in both. It said only "as
part of every job's purpose", which names no surface at all, so it now
names the two it reaches. The two messages must not collapse into one
sentence: whichever wording won would be wrong on the other side.

Verification. `the_two_utf8_refusals_each_name_the_surface_their_own_text_reaches`
asserts both directions, positive AND negative — the process message
contains `pmacs.process.list` and NOT `*workers*`/`modeline`, the job
message contains both of those and NOT `pmacs.process.list`. The
negative halves are the anti-collapse guard; without them a later
"unify the wording" edit reintroduces exactly one wrong sentence and
passes every other test in the file. The existing row-table assertion in
`spawning_without_a_real_purpose_is_refused_and_starts_nothing` now runs
as far as the surface name too, so the same edit breaks two tests.

Three mutation checks, each red on its own claim: restoring the old
process wording fails both content assertions; collapsing the job
message onto the process wording fails only the new test (which is the
point — the old job test asserted the prefix alone and could not see
it); restoring the job message's original vague wording fails it too.

The doc comments were fixed with the literals. `required_purpose`'s
rustdoc now states which surface its message names and why it names
neither of the other two, and the `_push_dispatch_name` comment states
the converse. A corrected string whose doc comment still argues the
other way is one refactor from reverting itself.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bqGA6s9tTUFzYpbeW3tai
2026-08-10 14:51:54 +02:00
..
audit
bin fix(lsp): close review round 1 on the resource-op delete guard 2026-07-29 11:45:43 -04:00
lua_bindings fix(process): name the surface a process purpose actually reaches 2026-08-10 14:51:54 +02:00
packages
terminal feat(workers): a required purpose on every job and process — worker identity Stage 1 2026-08-10 14:51:54 +02:00
ansi.rs
async_runtime.rs fix(workers): a safe display-text boundary for purpose and handler names 2026-08-10 14:51:54 +02:00
attach.rs feat(release): binaries on tag — Distribution Stage 1 2026-08-01 14:40:47 -04:00
attach_dispatch.rs
attach_reconnect.rs
autosave.rs
bootstrap.rs feat(bootstrap): make the ambient storage roots a parameter 2026-07-31 18:48:07 -04:00
buffer.rs wip(stage2a): name provenance plus the View rename hook 2026-07-29 17:38:21 -04:00
buffer_mirror.rs
buffer_registry.rs
builtin_packages.rs
cell.rs
code_action.rs
command.rs fix(discovery): clip command descriptions at the single-row surfaces 2026-08-10 13:52:32 +02:00
completion.rs feat(fold): Stage 2 — grid (daemon-rendered) collapse 2026-07-23 19:24:07 -04:00
completion_framework.rs
config.rs
config_registry.rs test: the report itself, at a real PTY — and §1.1 was wrong 2026-08-07 19:37:46 +02:00
crdt.rs fix(buffer): fan out generated writes, and clear the history that exists 2026-07-26 13:43:22 -04:00
daemon.rs feat(discovery): M-x rows carry descriptions — protocol v22 -> v23 2026-08-10 13:52:32 +02:00
daemon_attach.rs
definition.rs
desktop.rs feat(view): horizontal scroll, text and decorations together 2026-08-07 22:43:17 +02:00
diag.rs feat(view): horizontal scroll, text and decorations together 2026-08-07 22:43:17 +02:00
display_width.rs
document_highlight.rs
editor.rs fix(discovery): clip command descriptions at the single-row surfaces 2026-08-10 13:52:32 +02:00
editor_core.rs feat(view): wrap-aware coordinates, breaking in and additive out 2026-08-07 13:07:54 +02:00
file_io.rs
fold.rs fix(fold): address PR #142 review round 1 2026-07-23 13:42:20 -04:00
fold_view.rs feat(fold): Stage 2 — grid (daemon-rendered) collapse 2026-07-23 19:24:07 -04:00
font_pref.rs
formatting.rs
frontend.rs feat(discovery): M-x rows carry descriptions — protocol v22 -> v23 2026-08-10 13:52:32 +02:00
fs.rs fix(dired): address PR #165 review round 1 2026-07-25 15:21:26 -04:00
hash.rs
help.rs
highlight.rs feat(view): horizontal scroll, text and decorations together 2026-08-07 22:43:17 +02:00
hook.rs
hover.rs feat(fold): Stage 2 — grid (daemon-rendered) collapse 2026-07-23 19:24:07 -04:00
inlay_hint.rs
instance_buffer.rs
instance_render.rs
key.rs
keymap_stack.rs
keymap_tree.rs
lib.rs feat(bootstrap): make the ambient storage roots a parameter 2026-07-31 18:48:07 -04:00
locations.rs
lockfile.rs
lsp.rs feat(workers): a required purpose on every job and process — worker identity Stage 1 2026-08-10 14:51:54 +02:00
lsp_status.rs
lua.rs
lua_isolation.rs
main.rs docs: absorb the v1.1.0 release, and correct what it made stale 2026-08-01 18:09:59 -04:00
mcp.rs feat(workers): a required purpose on every job and process — worker identity Stage 1 2026-08-10 14:51:54 +02:00
menu.rs feat(fold): Stage 2 — grid (daemon-rendered) collapse 2026-07-23 19:24:07 -04:00
message_bus.rs
minibuffer.rs
optimistic.rs
overlay.rs feat(view): horizontal scroll, text and decorations together 2026-08-07 22:43:17 +02:00
overlay_color.rs
overlay_paint.rs feat(view): wrap-aware coordinates, breaking in and additive out 2026-08-07 13:07:54 +02:00
prepare_rename.rs
presence.rs
process.rs feat(workers): a required purpose on every job and process — worker identity Stage 1 2026-08-10 14:51:54 +02:00
project.rs
project_index.rs
protocol.rs feat(discovery): M-x rows carry descriptions — protocol v22 -> v23 2026-08-10 13:52:32 +02:00
rename.rs
rope.rs
search.rs feat(view): horizontal scroll, text and decorations together 2026-08-07 22:43:17 +02:00
semantic_client.rs
semantic_render.rs fix(discovery): clip command descriptions at the single-row surfaces 2026-08-10 13:52:32 +02:00
semantic_tokens.rs
signature.rs feat(fold): Stage 2 — grid (daemon-rendered) collapse 2026-07-23 19:24:07 -04:00
socket_path.rs
state.rs
statusline.rs fix(panel): close Stage 2A review round 2 (2 P1, 1 P2) 2026-07-26 10:38:21 -04:00
symbol.rs
syntax.rs feat(lean4): editing surface + Stage 1 acceptance (Q#LN5, LN6, LN17) 2026-07-25 09:59:48 -04:00
text_view.rs feat(view): horizontal scroll, text and decorations together 2026-08-07 22:43:17 +02:00
transport.rs
view.rs feat(view): horizontal scroll, text and decorations together 2026-08-07 22:43:17 +02:00
window.rs feat(view): horizontal scroll, text and decorations together 2026-08-07 22:43:17 +02:00
worker.rs
workers_buffer.rs fix(workers): a safe display-text boundary for purpose and handler names 2026-08-10 14:51:54 +02:00