-
Notifications
You must be signed in to change notification settings - Fork 0
Friendly worktree pool dirs + no-wire-in-UI ratchet #161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
89c5089
worktree pool roots: friendly gh-org-repo segments, legacy-root heal …
m4ttheweric 867a498
daemon status: label the events line; add the no-wire-in-ui ratchet
m4ttheweric 07b2956
neutralize identity fixtures per purity gate
m4ttheweric fc35716
friendly dirs review: hash path-kind segments, fix stale label ref
m4ttheweric 6e4ddfe
docs: percent-encoding of any kind is unsafe in pool segments
m4ttheweric af25450
pin the percent-free pool-segment invariant
m4ttheweric a584c15
merge main (RT-99 + friendly dirs reconcile coexistence)
m4ttheweric File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| /** | ||
| * The wire identity form (remote:host%2Forg%2Frepo) is a KEY and must never | ||
| * reach human-rendered output; anything a person reads goes through | ||
| * lib/repo-label.ts. This file is the ratchet: every formatter that turns | ||
| * repo identities into display text gets a case here, asserted wire-free. | ||
| * Adding a new human surface that touches identities? Add it below. | ||
| * (Payloads deliberately carry the wire form; this test covers RENDERED | ||
| * text only.) | ||
| */ | ||
| import { describe, expect, test } from "bun:test"; | ||
| import { repoLabel, repoLabelQualified } from "../repo-label.ts"; | ||
| import { formatFreshnessParts } from "../../commands/daemon.ts"; | ||
|
|
||
| const WIRES = [ | ||
| "remote:github.com%2Fm4ttstack%2Frt", | ||
| "remote:gitlab.com%2Facme%2Facme-dev", | ||
| "remote:gitlab.example.com%3A8443%2Fteam%2Fsub%2Frepo", | ||
| "path:%2FUsers%2Fdev%2Fscratch", | ||
| ]; | ||
|
|
||
| function expectWireFree(rendered: string): void { | ||
| expect(rendered).not.toMatch(/%2F|%3A|remote:|path:%/); | ||
| } | ||
|
|
||
| describe("repo labels are wire-free for every identity kind", () => { | ||
| for (const wire of WIRES) { | ||
| test(`repoLabel + repoLabelQualified: ${wire.slice(0, 24)}...`, () => { | ||
| expectWireFree(repoLabel(wire)); | ||
| expectWireFree(repoLabelQualified(wire)); | ||
| }); | ||
| } | ||
| }); | ||
|
|
||
| describe("daemon status events line", () => { | ||
| test("renders labels, never wire identities", () => { | ||
| const freshness = Object.fromEntries( | ||
| WIRES.map((w, i) => [w, { state: "live", lastSyncedAt: i % 2 ? null : new Date().toISOString() }]), | ||
| ); | ||
| for (const part of formatFreshnessParts(freshness, Date.now())) expectWireFree(part); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.