Event 44e0051b49bftiny

Event

44e0051b49bf | kind 1618 | ba1b5beed5b5
## Summary

Target: `main` at `5625d0b5f0230cb9d592d0e13baa9494a168f954`. Hosted main was first fast-forwarded from `7282499` to that GitHub baseline; this PR contains only the component extraction and its supporting changes.

- Move the existing Git engine and tests to public `tinygit`, used by both the integrated host and `cmd/tinygit`.
- Move the existing website, assets and tests to public `tinyclient`, used by the integrated host and `cmd/tinyclient`.
- Add standalone entry points, public API checks, real-process tests and dependency guards. No duplicate Git engine or frontend asset implementation.
- Add a session-authenticated, read-only frontend/backend adapter. Keep signed requests bound to the original public origin and tenant path.
- Add build targets, component guides, architecture terminology and a specification for the project-specific tinyclient read adapter.
- Document proposed subsequent module seams and distinguish upstream protocol rules, supported profiles, project extensions and local implementation details.

## Scope and compatibility

All components remain in the same repository and Go module. `tiny` retains its integrated behavior. Existing wire values, browser `tiny.*` APIs and on-disk Git journal/ref names are preserved.

Standalone tinygit serves public repositories for a configured owner and announced maintainers. It deliberately rejects private announcements and does not start relay/WebSocket delivery, UI or replication workers. The integrated private Git service is unchanged. The package still shares internal event, policy, authentication and SQLite implementations.

Standalone tinyclient serves one tenant using a compatible tinyrelay backend. Preserve the public origin and tenant path. It has no daemon, SQLite, storage or tinygit dependency; it is not an offline client or a frontend for arbitrary relays. Root-mounted clients reject `/r/...` routes rather than mixing tenant contexts. Other tenants and hosted-site domains need separate routing.

## Verification

Final run after review fixes:

- `make build`: all three executables built.
- `go test -mod=readonly -count=1 -json ./...`: passed.
- `go vet -mod=readonly ./...`: passed.
- `go test -mod=readonly -race -count=1 ./tinygit ./cmd/tinygit ./tinyclient ./cmd/tinyclient`: passed.
- `npm run test:tinyclient`: both generated bundles verified and all 286 JavaScript tests passed.
- Baseline-versus-extraction integrated binaries: 96 GET/HEAD cases across guest and authenticated-owner requests matched status, content type, redirects and exact body bytes using copies of the same fixture data.
- All 46 moved browser assets are byte-identical. No original Git or frontend test functions were lost.
- Tinygit command acceptance covers signed publication, push, clone, unauthorized-ref rejection and restart. The frontend real-backend integration covers login, rendering parity, signed operations, forged actors, logout and private metadata masking.

Independent review found and the changes address two frontend issues: preserving intentionally anonymous feed reads despite an incoming session cookie, and rejecting cross-tenant routes before either rendering or proxying. Regression tests cover feeds, actor mismatches and typed reads, HTTP methods, signed requests, WebSocket upgrades and encoded tenant prefixes.

Baseline caveats: the original Background Fetch JavaScript test used a fixed 50 ms sleep and failed on untouched main. This PR replaces that sleep with a bounded explicit start signal, without changing browser behavior. A reviewer also observed an intermittent `TestLargePushSurvivesHalfDuplexReverseProxy` failure on both the extraction and unchanged baseline. The final full run passed; a separate five-run baseline repetition passed. This does not establish that the pre-existing intermittent failure is fixed. `npm ci` reports two moderate advisories in unchanged dependencies.

## Follow-up stack

A separate branch will build on this PR for the approved shared protocol types, validation/access contracts and formal extension ownership work. This PR does not claim those later dependency seams are already extracted. No production deployment or merge is part of this submission.
event JSON
{"id":"44e0051b49bff1bc46e0c8293b0a696bd41a728c6528d59ad529924418d8e51f","pubkey":"ba1b5beed5b5b9691bc44d5eaeb7fedc1cf8427b06d6f26a0813e4724a589166","created_at":1789279500,"kind":1618,"tags":[["a","30617:c01503e8035f5a98eb2004721dc4eeddda498c7871927ae7edb4525ab6ccf2d7:tinyrelay"],["p","c01503e8035f5a98eb2004721dc4eeddda498c7871927ae7edb4525ab6ccf2d7"],["subject","Extract tinygit and tinyclient as standalone components"],["c","9d68e8778c3448fdc08c95e7b44bb30732692f83"],["clone","https://012.run/npub1cq2s86qrtadf36eqq3epm38wmhdynrrcwxf84eldk3f94dkv7ttsrulrz5/tinyrelay.git"],["merge-base","5625d0b5f0230cb9d592d0e13baa9494a168f954"],["t","refactor"]],"content":"## Summary\n\nTarget: `main` at `5625d0b5f0230cb9d592d0e13baa9494a168f954`. Hosted main was first fast-forwarded from `7282499` to that GitHub baseline; this PR contains only the component extraction and its supporting changes.\n\n- Move the existing Git engine and tests to public `tinygit`, used by both the integrated host and `cmd/tinygit`.\n- Move the existing website, assets and tests to public `tinyclient`, used by the integrated host and `cmd/tinyclient`.\n- Add standalone entry points, public API checks, real-process tests and dependency guards. No duplicate Git engine or frontend asset implementation.\n- Add a session-authenticated, read-only frontend/backend adapter. Keep signed requests bound to the original public origin and tenant path.\n- Add build targets, component guides, architecture terminology and a specification for the project-specific tinyclient read adapter.\n- Document proposed subsequent module seams and distinguish upstream protocol rules, supported profiles, project extensions and local implementation details.\n\n## Scope and compatibility\n\nAll components remain in the same repository and Go module. `tiny` retains its integrated behavior. Existing wire values, browser `tiny.*` APIs and on-disk Git journal/ref names are preserved.\n\nStandalone tinygit serves public repositories for a configured owner and announced maintainers. It deliberately rejects private announcements and does not start relay/WebSocket delivery, UI or replication workers. The integrated private Git service is unchanged. The package still shares internal event, policy, authentication and SQLite implementations.\n\nStandalone tinyclient serves one tenant using a compatible tinyrelay backend. Preserve the public origin and tenant path. It has no daemon, SQLite, storage or tinygit dependency; it is not an offline client or a frontend for arbitrary relays. Root-mounted clients reject `/r/...` routes rather than mixing tenant contexts. Other tenants and hosted-site domains need separate routing.\n\n## Verification\n\nFinal run after review fixes:\n\n- `make build`: all three executables built.\n- `go test -mod=readonly -count=1 -json ./...`: passed.\n- `go vet -mod=readonly ./...`: passed.\n- `go test -mod=readonly -race -count=1 ./tinygit ./cmd/tinygit ./tinyclient ./cmd/tinyclient`: passed.\n- `npm run test:tinyclient`: both generated bundles verified and all 286 JavaScript tests passed.\n- Baseline-versus-extraction integrated binaries: 96 GET/HEAD cases across guest and authenticated-owner requests matched status, content type, redirects and exact body bytes using copies of the same fixture data.\n- All 46 moved browser assets are byte-identical. No original Git or frontend test functions were lost.\n- Tinygit command acceptance covers signed publication, push, clone, unauthorized-ref rejection and restart. The frontend real-backend integration covers login, rendering parity, signed operations, forged actors, logout and private metadata masking.\n\nIndependent review found and the changes address two frontend issues: preserving intentionally anonymous feed reads despite an incoming session cookie, and rejecting cross-tenant routes before either rendering or proxying. Regression tests cover feeds, actor mismatches and typed reads, HTTP methods, signed requests, WebSocket upgrades and encoded tenant prefixes.\n\nBaseline caveats: the original Background Fetch JavaScript test used a fixed 50 ms sleep and failed on untouched main. This PR replaces that sleep with a bounded explicit start signal, without changing browser behavior. A reviewer also observed an intermittent `TestLargePushSurvivesHalfDuplexReverseProxy` failure on both the extraction and unchanged baseline. The final full run passed; a separate five-run baseline repetition passed. This does not establish that the pre-existing intermittent failure is fixed. `npm ci` reports two moderate advisories in unchanged dependencies.\n\n## Follow-up stack\n\nA separate branch will build on this PR for the approved shared protocol types, validation/access contracts and formal extension ownership work. This PR does not claim those later dependency seams are already extracted. No production deployment or merge is part of this submission.\n","sig":"c8f1a12ab1b767a3b2ba8abf7864780e7f5aa2e6c68c50a1be22fdfed61ba149da89607115681733ac8c6729d9b83aa55776cd4ee814cb65581b039157040436"}

Atom feed | JSON feed

About

identity726385c656ea
readsopen
writesallowlist
searchprose
gitGRASP-01
filesBlossom

Actions