Skip to content

POC: drop the lab's copied remote redaction - #2749

Closed
cursor[bot] wants to merge 33 commits into
claude/fix-1762-harness-manager-cztr0wfrom
poc/fix-1762-drop-copied-remote-redaction
Closed

cursor[bot] wants to merge 33 commits into
claude/fix-1762-harness-manager-cztr0wfrom
poc/fix-1762-drop-copied-remote-redaction

Conversation

@cursor

@cursor cursor Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

This PR does not merge. It is a smaller shape of #2748. After that PR lands, fold this subtraction and close this POC unmerged.

Subtracted

withoutCredentials in goals/devforce-lab/lab/host.mts. It re-parsed a remote with new URL and cleared the user and password. @flow-state-dev/workspace already does that in redactRemote (packages/workspace/src/remotes.ts), which host refusals use. Inbox now calls it. The export is one line. The lab helper is gone (13 lines).

The two strings this PR shows a person are unchanged: https://bot:s3cret-token@github.com/acme/storefront.git becomes https://github.com/acme/storefront.git, and git@github.com:… is left as written. A mixed-case host keeps its spelling; new URL would have lowercased it.

Still passes

  • labs/shift-manager/test/devteam-repository-ask.test.ts: 3 passed. Deny writes nothing, Approve writes the remote, a password is absent from the Inbox message and its data.
  • packages/workspace/test/remotes.spec.ts: 12 passed.

Left as it is

The three-way projectWorkspace answer, the ask-before-write, and the two rev-list probes. Folding the probes into one counter ties once each question stays.

Open in Web View Automation 

claude and others added 30 commits October 4, 2026 00:10
…-1756)

it-ships-an-artifact-a-person-can-open expected the channel post to skip
exactly [eng.coder, eng.reviewer], a list typed into the check. Since
FIX-1719 seated the chief of staff in DevTeam's channel, the fan-out
correctly skips it too, and the check has been red on main.

The expected skips are now every member CHANNEL.md declares except the
EM, read off the lab's roster. The check also fails if the tree stops
declaring the coder or the reviewer, so the claim can't hold vacuously.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
…dress (FIX-1757)

A hired seat's address is `<org>.<seatId>`, and `seatAddress` refused any org
id that wasn't a lowercase-hyphen segment. That refused the framework's own
default org and the `org_…` ids auth providers hand out, so a chief of staff
on such a Lab could never hire.

The org is now escaped with the same encoding as the user segment
(`encodeUserSegment`), which keeps the join injective and is the identity on
ids that were already legal, so existing addresses don't move.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
…te wiring; any org id hires (FIX-1757)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
…atAddress (FIX-1757)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
…ed; note why org ids are escaped (FIX-1757)

The V11 case asserted the old contract (an org id that isn't one segment is
refused). What it protected is injectivity: `kitchen-sink.support` + `ada`
must not answer where `kitchen-sink` + `support.ada` does. It now hires
both and checks they land on distinct addresses that split back to their own
seat ids. Also drops the stale validateSegment note from rows.ts.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
…ault-org seat guidance (FIX-1757)

A lone UTF-16 surrogate has no UTF-8 form, so the org escape mapped it onto
U+FFFD and two org ids shared one address (Codex P2). isValidOrgId now
refuses such ids at the principal boundary, and seatAddress checks again.

durable-hire.md told unauthenticated apps to put a resolver on a default-org
seat, which can't work: a resolver can't name the default org (401) and a
real org misses the pin (404). It now says such a seat is reachable only
with no resolver on the seat or the host.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
…IX-1757)

Next and Vercel hand the router `params.path` already decoded once; the
route matcher decoded it again, so a flow kind carrying a literal `%XX`
(an escaped seat address, org or user segment) resolved to the wrong id
there. The Node host passed raw segments, so it decoded once.

parseFlowRoute now takes decoded segments (re-encodes, matcher decodes
once). The Node host and the HTTP adapter's raw-URL fallback decode via
the new decodePathSegments. Tests per host shape (node, next, vercel).

Also: channels.md no longer claims a non-`projects` resources key is
refused; core changeset bumped to minor.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
…e parseFlowRoute's contract change (FIX-1757)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
… org ids (FIX-1757)

parseFlowRoute trimmed each segment after it became decoded, so a topic
" report " read as "report" (the wrong item, or a false 404) on every
host, Request.url fallback included. It now drops only empty segments.
Tests on the params path and the Request.url fallback.

The authentication docs (architecture and user-facing) now say an org id
must be well-formed Unicode, matching isValidOrgId.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
…every refused org id; workforce minor

The Docker and Railway recipes built params.path from raw URL segments;
the router now takes decoded ones, so they call decodePathSegments.
seatAddress's docs (table, README, JSDoc) list every refused org id:
empty, whitespace-only, not well-formed Unicode. Workforce is minor in
the changeset: the "Org" member left the exported SegmentLabel union.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
…that can fail (FIX-1757)

The reload goal now computes the default-org seat's expected address from
the documented escape rule (not seatAddress), and calls it over HTTP with
no identity on a resolver-less restarted host. Its control now breaks
default-org admission in instance-pin.ts and fails leg (c) with a 404.

The authentication architecture doc no longer says the default resolver
names no organization: the runtime supplies DEFAULT_ORG_ID, which a
default-org pin admits on a resolver-less host. The workforce README's
"cannot hire" line is corrected the same way.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
The anti-game clause now requires the independently computed escaped
default-org address and the resolver-less HTTP answer, not the old
problem-entry wording; the signal counts four app instances, the run note
names every package to build, and the verdict rows cite the commit.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
…ncoded basePath; name FIX-1757 in the changeset

- splitSeatAddress returns undefined for every org id seatAddress refuses
  (empty, whitespace-only, lone surrogate) instead of throwing.
- The Node host and the HTTP adapter's Request.url fallback strip the
  basePath in its encoded form, as URL.pathname carries it, so a base
  like "/api/my path" comes off before the rest is decoded.
- The reload goal escapes the named org's address by the documented rule,
  so a fixture org like org_pentest_lab still passes.
- The changeset names FIX-1757 (it only passed the ref check because
  "UTF-16" matches the issue-ref pattern).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
…rojects collection, under any key (FIX-1757)

A repo-wide sweep of every statement of which org ids are refused now
lists all of them (empty, whitespace-only, not well-formed Unicode,
DEFAULT_ORG_ID for a resolver): flow config, state operations, the
org-scope guide, the authentication page, the CLI docs and README, the
core JSDoc, and the three runtime error messages that said "nonempty".
The mintFor refusal now reads "other than the projects collection" in
channels.md and the workforce README, matching the any-key guidance.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
…IKE; fsdev minor (FIX-1757)

The hired-seat migration step built its flow_id prefix from the raw org.
It now builds the escaped prefix (seatAddress's rule), escapes LIKE
metacharacters, and matches with ESCAPE '\', with an org_pentest_lab
worked example. The changeset bumps @flow-state-dev/fsdev to minor and
says `fsdev run --org` now rejects a lone-surrogate id.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
…ery isValidOrgId consumer (FIX-1757)

The changeset now covers every published package whose behavior the
lone-surrogate refusal changes, found by grepping isValidOrgId /
orgSegment / seatAddress / splitSeatAddress across packages/*/src:
bullmq (an enqueued job with such an org fails) and scheduled (such a
row is quarantined) join core, engine, fsdev and workforce at minor,
each with its upgrade impact.

durable-hire.md's "Calling a hired seat" says to put the address in a
hand-built URL with encodeURIComponent, with the org_pentest_lab example.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
Conflicts were docs-only, from main's channel -> mailbox rename meeting
FIX-1757's doc edits: chief-of-staff.md, mailboxes.md (was channels.md)
and the workforce README. Kept FIX-1757's content under the mailbox names,
and main's new pre-rename rows.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
Conflicts in the devforce-lab artifact goal: main renamed channels to
mailboxes. Kept main's MAILBOX.md-based reads and the addresses option,
and re-applied FIX-1756's skip list read off the declared members with
the guard that the claimed members are still declared.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
The mailbox-rename guard rejects the old file name.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cb565RgMJYrvVrK9Jsqi4U
Chief of staff can hire under any org id (FIX-1757)
…p-list

fix(goals): read the DevForce channel's skip list off CHANNEL.md (FIX-1756)
A project row records the git remote its code lives in, and a project
keeps its own files in an org collection only its members can read.

- `repository: string | null` on the projects row, default null, in the
  browser read. Stored rows are not re-parsed on read, so a legacy row
  is read through `projectRowSchema` or guarded with `== null`.
- `createProject.repository` and `setRepository { projectId, repository }`
  (members only, rewritten from the stored state, retried on a lost CAS
  race). One validator, `repository-value.ts`, refuses a path, a leading
  `-`, a control character, a remote-helper address and a credential
  with `invalid-repository`, never repeating the value. Both SSH spellings
  and file:// pass; which remotes a host reaches is the host's call.
- `project-files/**`: org-scoped, shared, lazy, no browser read, keyed
  `<projectId>/<path>`. `readProjectFiles { projectId }` lists only that
  project's prefix, members only.
- Controls: FSD_CONTROL=any-repository turns the refusal test red;
  no-retry turns the repository burst red; no-gate the non-member tests.

Workforce README, the Projects docs page, and a minor changeset.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P9UuEKLJUWaKiSrYWCJbt5
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UyaSbP7u4EMjKM6U3bXQ6t
readProjectFiles lists one project's files, but the lazy wrapper loaded the
whole project-files/ collection for the org first. Push the caller's prefix
to the loader, and treat an already-loaded ancestor prefix as covering it.
Also condense the FIX-1762 changeset to one sentence.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UyaSbP7u4EMjKM6U3bXQ6t
A handler's output is logged as the tool result, so returning every file's
body would put a whole project's files into the session log and the model's
context. Return each file's path and UTF-8 byte size instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UyaSbP7u4EMjKM6U3bXQ6t
…ry-tikxs6' into claude/fix-1762-lab-and-goal-bea8wn
…rd (FIX-1762)

A coding run on a mailbox board now gets its files from the project that
holds the board's workstream: board -> mailbox (derived from the board's
minted id) -> the workstream's claim -> the project row -> its repository
with the project's files beside the checkout, or the project's files
alone. Reads only the claim and the row; refuses a run whose owner is not
a member, or whose workstream no project holds, before any file is read.
projectWorkspaceCapability declares the collections it reads.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P9UuEKLJUWaKiSrYWCJbt5
…its files (FIX-1762)

The lab's coder runs on a workspace host whose source is projectWorkspace on
the board. Storefront names a bare repository beside the store; a new Sandbox
project names none. The chief of staff gains setRepository, and every
repository write (setRepository, or createProject with one) waits on a
human_approval in Inbox first. phase.mts validate now receives the host.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P9UuEKLJUWaKiSrYWCJbt5
The Brief tab shows the repository the project's coding work runs in, or
"No repository · runs on project files". A legacy row reads as none.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P9UuEKLJUWaKiSrYWCJbt5
claude and others added 3 commits October 4, 2026 23:01
…(FIX-1762)

Three legs on the DevTeam lab: a project with a repository runs on a branch of
it with its kept files beside the checkout; a project without one runs on its
files and the next run sees them; a remote the host does not allow is refused
by name before anything is cloned. Controls fixed-source and no-sync-back.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P9UuEKLJUWaKiSrYWCJbt5
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P9UuEKLJUWaKiSrYWCJbt5
The lab's withoutCredentials re-parsed a remote the workspace package already redacts. Inbox calls that function.

Co-authored-by: Jake Hoffner <jhoffner@users.noreply.github.com>
@vercel

vercel Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
flow-state-dev-docs Ignored Ignored Oct 4, 2026 11:08pm UTC
flow-state-dev-kitchen-sink Ignored Ignored Oct 4, 2026 11:08pm UTC
flow-state-dev-ui Ignored Ignored Oct 4, 2026 11:08pm UTC

Request Review

@linear-code

linear-code Bot commented Oct 4, 2026

Copy link
Copy Markdown

FIX-1762

jhoffner pushed a commit that referenced this pull request Oct 4, 2026
…e (FIX-1762)

Drops the lab's own withoutCredentials copy; workspace now exports
redactRemote. Folds Cursor's POC #2749.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HncstYwr5VM81872oUq6gc

jhoffner commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

from: fsd-head-of-engineering
session: em-fix-1786
kind: reply

Closing unmerged. This POC's change is already on main: it was folded into #2748 as 8628a54, and redactRemote is exported from @flow-state-dev/workspace and used by goals/devforce-lab/lab/host.mts. Per the FIX-1787 inventory.


Generated by Claude Code

@jhoffner jhoffner closed this Oct 6, 2026
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.

3 participants