Skip to content

docs(claude): apply session-reflection fixes - #643

Merged
Ardnived merged 2 commits into
mainfrom
chore/session-reflection-fixes
Aug 20, 2026
Merged

Ardnived merged 2 commits into
mainfrom
chore/session-reflection-fixes

Conversation

@Ardnived

Copy link
Copy Markdown
Contributor

Two rules corrected after they misled a session (/reflect-session on PR #642). Docs-only.

.claude/rules/migrations.md — "exit 0, no new files" was one row, and it's two

The outcome table read that signal as no schema changes, full stop. In #642 it meant the CLI had died silently instead — payload/bin.js runs void start() with no .catch(), so a config-load rejection exits 0 with zero bytes on stdout and stderr. A manager_id column genuinely needed a migration, and the table pointed straight at the wrong conclusion.

That matters more than most doc errors: shipping a schema change with no migration is a prod crash-loop on boot (column ... does not exist), not a silent no-op.

The two readings are indistinguishable from the shell, so the table now splits on the newest .json snapshot — it's the schema the next migration diffs against, so a column missing from it has been captured by nothing. A new subsection carries the check and the escalation ladder (preload .env and redirect stdout, since piping to tail/grep also loses the output; then drive payload.db.createMigration() from node --import tsx/esm with an unhandledRejection handler). Both rungs were needed in #642, where dangerouslyDisableSandbox alone was not — contrary to what the standing memory claimed, which has been corrected too.

.claude/rules/tests.md — Tests no tests

Vitest reports a syntax error in a spec as an empty file, so a broken test name reads as "no case matched" and sends you to the lane config instead of the file you just edited. One paragraph under "Running tests locally", with the two ways to see the real error.

Not included

A third approved item — relationships aren't populated inside a field afterRead, so data.<rel> is a bare id at any depth — belongs in collections.md beside the sibling afterRead gotcha and next to the resolveManager code it cites. Both live on the unmerged #642 branch, so it ships there instead; putting it on main would cite a file that doesn't exist yet and would likely conflict.

Three memory files were also updated outside the repo (the CLI escalation ladder, the admin-copy audience, and two new ways a mutation check can lie).

🤖 Generated with Claude Code

Ardnived and others added 2 commits August 20, 2026 14:08
The outcome table read that signal as "no schema changes", full stop. In
PR #642 it meant the CLI had died silently instead — a `manager_id`
column genuinely needed a migration, and the table pointed straight at
the wrong conclusion. Shipping a schema change with no migration is a
prod crash-loop on boot, not a silent no-op, so the two readings are
worth separating.

They are indistinguishable from the shell, so the table now splits on
the newest `.json` snapshot: it is the schema the next migration diffs
against, so a column missing from it has been captured by nothing.

Co-Authored-By: Claude Opus 5 <[email protected]>
Vitest reports a syntax error in a spec file as an empty one, so a
broken test name reads as "no case matched" and sends you looking at the
lane config instead of the file you just edited.

Co-Authored-By: Claude Opus 5 <[email protected]>
@railway-app

railway-app Bot commented Aug 20, 2026

Copy link
Copy Markdown

🚅 Deployed to the SahajCloud-pr-643 environment in sahajcloud

Service Status Web Updated (UTC)
SahajCloud 🕒 Building (View Logs) Web Aug 20, 2026 at 9:09 pm

@Ardnived
Ardnived merged commit 87609d3 into main Aug 20, 2026
1 check passed
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-643 August 20, 2026 21:09 Destroyed
@Ardnived
Ardnived deleted the chore/session-reflection-fixes branch August 20, 2026 21:09

This branch was successfully deployed

No deployments
sahajcloud / SahajCloud-pr-643 — 6ca06bd9 Deployed Aug 20, 2026 by railway-app[bot]
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