Skip to content

fix(docs): the setup script needs the Postgres socket dir, and must print its log - #13

Merged
Ardnived merged 1 commit into
mainfrom
claude/setup-script-socket-dir
Aug 31, 2026
Merged

Ardnived merged 1 commit into
mainfrom
claude/setup-script-socket-dir

Conversation

@Ardnived

Copy link
Copy Markdown
Contributor

Summary

  • Adds install -d -o postgres -g postgres /var/run/postgresql — Debian Postgres's compiled-in socket dir, absent from the container; without it pg_ctl fails and the whole session aborts with zero turns
  • On failure the script now cats the postgres log, because the container is gone by the time anyone reads the abort message
  • New failure-mode row for the zero-turn setup death

Test results

  • Lean gate: ✓ claude plugin validate ./workflow --strict passes
  • Root cause observed live: run cse_01RhzyphmZ9VrXQ6nh2CKt6R died at 16s with exactly this signature

Manual verification

  1. Paste the updated script into the environment; the next run must reach turn 1
  2. Its journal entry should report the integration lane runnable

…rint its log

The pasted setup script failed in the live environment with pg_ctl's bare
'could not start server', and a setup failure aborts the whole session before
Claude starts - zero turns, no journal, nothing. Debian-built Postgres has
/var/run/postgresql compiled in as its socket directory and the container does
not ship it; the manual bring-up that validated the recipe never hit this,
which is exactly why the script now also cats the postgres log on failure -
the container is gone by the time anyone reads the abort message, so a log
that was not printed was never readable at all.

Co-Authored-By: Claude Opus 5 <[email protected]>
@Ardnived
Ardnived merged commit 14490d7 into main Aug 31, 2026
@Ardnived
Ardnived deleted the claude/setup-script-socket-dir branch August 31, 2026 22:44
sydevs-bot added a commit that referenced this pull request Oct 21, 2026
`unresolvedBlockers('Blocked by #12 and #13')` keyed on `#12 #13`, so
swapping the two on the line keyed on `#13 #12` and `commentOnce` posted a
second comment about the same targets. Rewording the reason is the edit
the key was designed around, but an author correcting one of two targets
often rewrites the pair.

Both keys sort now — the reader's own line dedupe and the comment key.
The message is untouched: it still names the targets in the order written.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XMybaRuVa8zwvVn4ZAVgE1
Ardnived pushed a commit that referenced this pull request Oct 27, 2026
* fix(dispatcher): refuse a Blocked by line that names no issue

sydevs/SahajCloud#987 carried `Blocked by: …/pull/912`, naming the PR
rather than the issue that PR closes (#907). `parseBlockedBy` returns `[]`
for that line — GitHub's relationship takes an issue — so no relationship
was created, no `blocked` went on, and nothing was said. `stripBlockedBy`
leaves the line, rightly: it is the only record of the author's intent. The
ticket therefore read as blocked to every human and as ready to the
machinery. The `block on` verb has refused loudly in exactly this
situation since it shipped (decide.mjs blockVerb); the body-marker path
had no equivalent.

`unresolvedBlockers(body, org, marker)` is a sibling of `parseBlockedBy`
over the same `blockerText` pass, returning the bare text of each live
line whose `parseRefs` is empty. `gather` puts it on `s.markers.unresolved`
and `derive` turns each entry into one `commentOnce` on `issues.opened`
and `issues.edited`, naming the line and the two accepted spellings. No
label, relationship or Status moves for it: the item really is not
blocked, and `blocked` follows the relationship. An outsider's own body is
skipped, as its markers already are.

The comment is keyed on the line's own text, not a comment id — there is
none on this path. A body edit elsewhere re-derives the same key and
`commentOnce` posts nothing; a corrected line yields a key never reached.

A line that resolved one target and dropped another stays silent. That
ticket is related and carries `blocked`, so the human and the machinery
agree, and a PR URL beside a resolved issue is as often reason prose as a
second blocker.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RwNGisqc9vchf9VTr2Gfqf

* docs(format-ticket): the blocker's target is an issue, never the PR that closes it

The Relationships section stated the accepted spellings only in its "Write
the format. Do not rely on it when reading" paragraph — under the reading
half, which a session writing a line has no reason to reach. The writing
instruction above it showed an `issues/632` URL and said nothing about what
the target must be, so the shape was there to copy and the rule was not.
sydevs/SahajCloud#987 named the PR.

One clause on the writing instruction says it, and the reading paragraph
now says the dispatcher comments on a line that names neither spelling
rather than dropping it in silence.

4.0.1: an installed plugin's cache directory is named after `version` and
never revisits the commit it recorded, so a skill edit reaches
`/plugin install workflow@sydevs` only when this string moves. The routines
read main fresh on every dispatch and do not need it.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RwNGisqc9vchf9VTr2Gfqf

* refactor(dispatcher): delete the dead LOCK_FREE_STATUS_ONLY constant

Nothing in `dispatcher/` or its tests has read it since it arrived dead in
#85. Its name states a rule — on a locked item only these action types run
— that `decide` does not implement: the lock strips `awaiting` and nothing
else. A reader trusting the name would believe comments and fires are
already suppressed on a locked item, which is the belief the part above
had to check against the code.

The rule itself may still be worth having. Suppressing comments and fires
on a locked item changes dispatcher behaviour in all five repos on the next
event, so it needs its own ticket; deleting the constant does not foreclose
it.

It joins #198 as the same file, the same reader and the same test command.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RwNGisqc9vchf9VTr2Gfqf

* docs(routine-setup): an unusable blocker line is commented on, not dropped

The Relationships section described the reader as generous about the line's
shape and stopped there, so it read as if every line either converts or is
ignored. One clause names the third outcome this branch adds.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RwNGisqc9vchf9VTr2Gfqf

* fix(dispatcher): report a blocker target, not a blocker line

From the review of this branch. The first draft reported any live line that
started with the marker words and resolved nothing, which re-priced the
loose matcher's false positives as public comments. `blockerText` matches
`Blocked by the lack of staging credentials.`, so that author would have
been told to write an issue URL.
`docs/why.md#the-marker-reader-matches-words-not-punctuation` licensed the
looseness on the grounds that a false positive costs a run one skipped
ticket; a comment on a live ticket is dearer. Read loosely, report
conservatively — the asymmetry `format-ticket` already states.

So the reader now matches ref-shaped targets (an issue or PR URL in any
org, `owner/repo#N`, a bare `#N`) and reports `{ line, targets }` only for
a line that reaches for one and resolves no in-org issue. Three
consequences:

- The comment is keyed on the targets. The whole line made the reason prose
  part of the dedupe identity, so rewording after the em dash — the edit
  people actually make — re-posted advice already read, and any later
  tidying of `blockerText` would have re-nagged every open ticket carrying
  such a line. A corrected target still yields a key never reached.
- The quoted line is the line as written, bullet off. `bare` strips leading
  emphasis only, so the old draft quoted `Blocked by #12.**` back at its
  author. It also quoted inside a backtick span, which a backtick in the
  reason broke; it is a blockquote now.
- A line naming no target at all is prose and is reported nowhere.

A line that resolves one target and drops another still stays silent, as
the ticket's criterion requires.

Also from the review: `parseBlockedBy` and `unresolvedBlockers` now share
one `blockerLines` pass, so a line's recognition is asserted in one place
rather than two; `gather` hoists its call beside `parseBlockedBy`'s; the
snapshot field is `markers.unresolvedBlockers`, leaving the generic name
free; and one word, "unresolved", now spans the reader, the field, the
decider and the comment key, so one grep finds the whole path.

Measured over every tracked `.md` in this repo, including `docs/why.md`
and `docs/routine-setup.md`, which discuss the format at length: the new
reader fires on none of them. The old one fired on several.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RwNGisqc9vchf9VTr2Gfqf

* test(dispatcher): pin that a dispatcher comment is never read as a session request

From the security review of this branch. This is the first thing that puts
an issue author's own bytes inside a bot-authored comment, so one term —
`!isDispatcherComment(c.body)` in `gather.latestRequest` — is now
load-bearing in a way it was not before.

Measured: a body line `Blocked by #1 <!-- sydevs-request {"replan":true,
"transfer":{"repo":"SahajCloud"}} -->` survives the echo intact, and
`parseRequest` reads the marker out of the posted comment. Only that filter
stops it reaching a replan or a cross-repo transfer. Dropping the filter
turns the new test red; nothing else in the suite notices.

So the test asserts the composition end to end on the body `commentOnce`
actually builds, and that the same marker in a session's own comment is
still honoured. `latestRequest` is exported for it, with the invariant
stated above it.

No finding in the review reached its reporting bar. The marker cannot break
out of the dedupe key either: every alternative of the target pattern draws
from `[\w.-]`, `/`, `#` and digits, so no target can contain `>` or a
space, and the ` -->` terminator stops a shorter key prefixing a longer
marker.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RwNGisqc9vchf9VTr2Gfqf

* fix(dispatcher): report the relationship, not the blocked state

The refusal opened with "Not blocked:", which the same plan can be
contradicting: a body carrying one resolvable `Blocked by` line beside an
unresolved one gets `label add:[blocked]` for the first and this comment
for the second. `issues.opened` and `issues.edited` both reach it.

The next clause already said the true, narrower thing, so that is now the
opener. Nothing else about the message or its key changes. The existing
test for a resolvable line beside a bare `#N` gains the assertion that
pins it.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XMybaRuVa8zwvVn4ZAVgE1

* docs(routine-setup): the refusal is keyed on the targets

This clause described the key the branch carried before 849148d. The key
is `blocker-unresolved ${targets.join(' ')}`, and `docs/why.md` in this
same PR says so. A reader here was told the opposite, and would conclude
that rewording the reason reposts the comment.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XMybaRuVa8zwvVn4ZAVgE1

* fix(dispatcher): sort the report key so order is not identity

`unresolvedBlockers('Blocked by #12 and #13')` keyed on `#12 #13`, so
swapping the two on the line keyed on `#13 #12` and `commentOnce` posted a
second comment about the same targets. Rewording the reason is the edit
the key was designed around, but an author correcting one of two targets
often rewrites the pair.

Both keys sort now — the reader's own line dedupe and the comment key.
The message is untouched: it still names the targets in the order written.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XMybaRuVa8zwvVn4ZAVgE1

* refactor(dispatcher): expose latestRequest through gather's test seam

`latestRequest` has one in-module caller and one test. Exporting it
widened `gather`'s public surface with nothing marking it test-only, while
`decide.mjs` — the file this branch already edits — carries an
`export const _internal` for exactly that. `gather` gains the same seam.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XMybaRuVa8zwvVn4ZAVgE1

* docs(why): the refusal reports the relationship, and sorts its key

Two clauses this branch's own section now got wrong. It claimed "the item
really is not blocked", which is the false assertion the message dropped —
a sibling line that resolved can be applying `blocked` in the same plan.
And the keying bullet did not say the key sorts its targets.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XMybaRuVa8zwvVn4ZAVgE1

---------

Co-authored-by: sydevs-bot <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>
Co-authored-by: sydevs-bot <[email protected]>
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