GeezerVison is showing github.com — feat(web): open registered task wikilinks by tomcorke · Pull Request #28838 · pingdotgg/t3code
feat(web): open registered task wikilinks
#28838
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
Uh oh!
There was an error while loading. Please reload this page.
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter
Filter by extension
.ts
(19)
.yml
(2)
All 2 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Hide whitespace
Diff view
Hide whitespace
feat(server): add revision-aware registered task documents
* feat(server): add revision-aware registered task documents
* ci: run fork checks on GitHub-hosted runners
* test(server): repair migration and cleanup CI fixtures
Loading branch information
Uh oh!
There was an error while loading. Please reload this page.
commit acc3a7ece73474dc8c0b9124a9006e5030018439
There are no files selected for viewing
Original file line number
Diff line number
Diff line change
Expand Up
@@ -22,7 +22,7 @@ jobs:
# open: if the diff cannot be resolved, everything runs.
changes:
name: Changes
runs-on: blacksmith-2vcpu- ubuntu-2404
runs-on: ubuntu-24.04
timeout-minutes: 5
outputs:
typecheck: ${{ steps.detect.outputs.typecheck }}
Expand Down
Expand Up
@@ -63,7 +63,7 @@ jobs:
contents: read
id-token: write
name: Lint
runs-on: blacksmith-8vcpu- ubuntu-2404
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout
Expand Down
Expand Up
@@ -119,12 +119,13 @@ jobs:
name: Build and Typecheck
needs: changes
if: ${{ !cancelled() && (needs.changes.outputs.build != 'false' || needs.changes.outputs.typecheck != 'false') }}
runs-on: blacksmith-8vcpu- ubuntu-2404
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 2
sparse-checkout: |
/*
!/.repos/
Expand All
@@ -138,7 +139,7 @@ jobs:
- name: Start installing browser secret helper build libraries
if: needs.changes.outputs.build != 'false'
run: |
sudo sed -i 's|http://|https://|g' /etc/apt/blacksmith-ubuntu-mirrors.txt /etc/apt/ sources.list.d/ubuntu.sources
sudo sed -i 's|http://|https://|g' /etc/apt/sources.list.d/ubuntu.sources
(
set +e
sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config
Expand Down
Expand Up
@@ -200,6 +201,12 @@ jobs:
cat "$RUNNER_TEMP/typecheck.log"
exit "$(cat "$RUNNER_TEMP/typecheck-status")"
- name: Check changed files on Linux
if: ${{ github.event_name == 'pull_request' }}
env:
CHECK_BASE: ${{ github.event.pull_request.base.sha }}
run: vp run check:changed "$CHECK_BASE"
# Everything except `t3` (apps/server) and the web app, which has its own job
# below. `--parallel` drops the package dependency ordering that `vp run`
# applies by default: these `test` tasks declare no `dependsOn` and resolve
Expand All
@@ -213,7 +220,7 @@ jobs:
name: Test
needs: changes
if: ${{ !cancelled() && needs.changes.outputs.test != 'false' }}
runs-on: blacksmith-8vcpu- ubuntu-2404
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout
Expand All
@@ -231,7 +238,7 @@ jobs:
# the background while Vite+ installs; the step before the tests waits for it.
- name: Start installing browser secret helper build libraries
run: |
sudo sed -i 's|http://|https://|g' /etc/apt/blacksmith-ubuntu-mirrors.txt /etc/apt/ sources.list.d/ubuntu.sources
sudo sed -i 's|http://|https://|g' /etc/apt/sources.list.d/ubuntu.sources
(
set +e
sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config
Expand Down
Expand Up
@@ -289,7 +296,7 @@ jobs:
name: Test Web
needs: changes
if: ${{ !cancelled() && needs.changes.outputs.test_web != 'false' }}
runs-on: blacksmith-8vcpu- ubuntu-2404
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout
Expand Down
Expand Up
@@ -353,7 +360,7 @@ jobs:
contents: read
id-token: write
name: Test Server ${{ matrix.shard }}
runs-on: blacksmith-4vcpu- ubuntu-2404
runs-on: ubuntu-24.04
# Shards take 2-5 minutes. When the shared task cache throttles reads, each
# failed fetch stalls vp for 15-90s, which pushed shards past 10 minutes.
timeout-minutes: 20
Expand Down
Expand Up
@@ -469,7 +476,7 @@ jobs:
name: Rust
needs: changes
if: ${{ !cancelled() && needs.changes.outputs.rust != 'false' }}
runs-on: blacksmith-4vcpu- ubuntu-2404
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout
Expand Down
Expand Up
@@ -502,7 +509,7 @@ jobs:
name: Mobile Native Static Analysis
needs: changes
if: ${{ !cancelled() && needs.changes.outputs.mobile_native != 'false' }}
runs-on: blacksmith-6vcpu- macos-26
runs-on: macos-26
timeout-minutes: 10
steps:
- name: Checkout
Expand Down
Expand Up
@@ -535,7 +542,7 @@ jobs:
name: Release Smoke
needs: changes
if: ${{ !cancelled() && needs.changes.outputs.release_smoke != 'false' }}
runs-on: blacksmith-8vcpu- ubuntu-2404
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout
Expand Down
Expand Up
@@ -575,7 +582,7 @@ jobs:
mobile_native_static_analysis,
release_smoke,
]
runs-on: blacksmith-2vcpu- ubuntu-2404
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Require every job to pass
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -25,7 +25,7 @@ concurrency:
jobs:
fingerprint:
name: Native fingerprint diff
runs-on: blacksmith-8vcpu- ubuntu-2404
runs-on: ubuntu-24.04
permissions:
contents: read
env:
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -77,6 +77,7 @@ it.layer(NodeServices.layer)("ServerEnvironmentLive", (it) => {
it.effect("publishes proven install ownership only for manually updated servers", () =>
Effect.gen(function* () {
const fs = yield* FileSystem.FileSystem;
const platform = yield* HostProcess.Platform;
const baseDir = yield* fs.makeTempDirectoryScoped();
const prefix = `${baseDir}/node`;
const entry = `${prefix}/lib/node_modules/t3/dist/bin.mjs`;
Expand All
@@ -87,7 +88,7 @@ it.layer(NodeServices.layer)("ServerEnvironmentLive", (it) => {
`${prefix}/lib/node_modules/t3/package.json`,
'{"name":"t3","version":"0.0.45","bin":{"t3":"./dist/bin.mjs"}}',
);
yield* fs.symlink(entry, `${prefix}/bin/t3`);
if (platform !== "win32") yield* fs.symlink(entry, `${prefix}/bin/t3`);
const config = yield* makeServerConfig(baseDir);
yield* fs.makeDirectory(config.stateDir, { recursive: true });
for (const mode of ["web", "desktop"] as const) {
Expand All
@@ -103,11 +104,11 @@ it.layer(NodeServices.layer)("ServerEnvironmentLive", (it) => {
),
Effect.provideService(HostProcess.Arguments, ["node", entry]),
Effect.provideService(HostProcess.IsExecutable, false),
Effect.provideService(HostProcess.Platform, "linux" ),
Effect.provideService(HostProcess.Platform, platform ),
Effect.provideService(HostProcess.Environment, {}),
);
expect(descriptor.capabilities.serverInstallation).toEqual(
mode === "web" ? { kind: "npm-global", prefix } : undefined,
mode === "web" && platform !== "win32" ? { kind: "npm-global", prefix } : undefined,
);
expect(descriptor.capabilities.serverSelfUpdate).toBe(
mode === "web" ? undefined : "desktop-managed",
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -217,6 +217,7 @@ export const make = Effect.gen(function* () {
orchestrationProtocolVersion: ORCHESTRATION_PROTOCOL_VERSION,
...(databaseMigration === undefined ? {} : { databaseMigration }),
capabilities: {
taskDocuments: true,
repositoryIdentity: true,
connectionProbe: true,
attachmentUploads: true,
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -11,6 +11,17 @@ type WsRpcMethod = RpcGroup.Rpcs<typeof WsRpcGroup>["_tag"];
// Trace queries and dashboards depend on these labels, including deviations from method prefixes.
const RPC_AGGREGATES = {
[WS_METHODS.taskDocumentsRegister]: "taskDocuments",
[WS_METHODS.taskDocumentsOpen]: "taskDocuments",
[WS_METHODS.taskDocumentsList]: "taskDocuments",
[WS_METHODS.taskDocumentsSave]: "taskDocuments",
[WS_METHODS.taskDocumentsRelink]: "taskDocuments",
[WS_METHODS.taskDocumentsUnregister]: "taskDocuments",
[WS_METHODS.taskDocumentsListRecovery]: "taskDocuments",
[WS_METHODS.taskDocumentsReadRecovery]: "taskDocuments",
[WS_METHODS.taskDocumentsSubscribeCatalogue]: "taskDocuments",
[WS_METHODS.taskDocumentsSubscribeDocument]: "taskDocuments",
[ORCHESTRATION_V2_WS_METHODS.dispatchCommand]: "orchestrationV2",
[ORCHESTRATION_V2_WS_METHODS.getWorkflowScript]: "orchestration",
[ORCHESTRATION_V2_WS_METHODS.stopWorkflow]: "orchestration",
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -76,6 +76,7 @@ import Migration0070 from "./Migrations/070_PeerLinks.ts";
import Migration0071 from "./Migrations/071_PeerLinkFence.ts";
import Migration0072 from "./Migrations/072_WaitingLinkRequestIndex.ts";
import Migration0073 from "./Migrations/073_ActiveTurnItemIndexes.ts";
import Migration0074 from "./Migrations/074_TaskDocuments.ts";
const migrationEntries = [
[1, "OrchestrationEvents", Migration0001],
Expand Down
Expand Up
@@ -152,6 +153,7 @@ const migrationEntries = [
[71, "PeerLinkFence", Migration0071],
[72, "WaitingLinkRequestIndex", Migration0072],
[73, "ActiveTurnItemIndexes", Migration0073],
[74, "TaskDocuments", Migration0074],
] as const;
export const migrationManifest = migrationEntries.map(([id, name]) => [id, name] as const);
Expand Down
Original file line number
Diff line number
Diff line change
@@ -0,0 +1,13 @@
import * as Effect from "effect/Effect";
import * as SqlClient from "effect/sql/SqlClient";
export default Effect.gen(function* () {
const sql = yield* SqlClient.SqlClient;
yield* sql`CREATE TABLE task_documents (
task_document_id TEXT PRIMARY KEY,
canonical_path TEXT NOT NULL UNIQUE,
file_id TEXT UNIQUE,
locator_version INTEGER NOT NULL DEFAULT 0,
registered INTEGER NOT NULL DEFAULT 1
)`;
});
Original file line number
Diff line number
Diff line change
Expand Up
@@ -53,6 +53,7 @@ describe("V2 preview upgrade", () => {
[71, "PeerLinkFence"],
[72, "WaitingLinkRequestIndex"],
[73, "ActiveTurnItemIndexes"],
[74, "TaskDocuments"],
]);
assert.deepStrictEqual(yield* runMigrations(), []);
assert.deepStrictEqual(yield* sql`SELECT * FROM orchestration_v2_legacy_imports`, imports);
Expand Down
Expand Up
@@ -149,6 +150,7 @@ describe("V2 preview upgrade", () => {
[71, "PeerLinkFence"],
[72, "WaitingLinkRequestIndex"],
[73, "ActiveTurnItemIndexes"],
[74, "TaskDocuments"],
]);
}).pipe(Effect.provide(NodeSqliteClient.layer({ filename: ":memory:" }))),
);
Expand Down
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,4 @@
import * as TaskDocuments from "./tasks/TaskDocuments.ts";
import * as ProviderEventLoggers from "@t3tools/provider-core/server/ProviderEventLoggers";
import type { RelayManagedEndpointRuntimeConfig } from "@t3tools/contracts/relay";
import * as Random from "effect/Random";
Expand Down
Expand Up
@@ -675,6 +676,7 @@ const layerRuntimeCoreDependencies = layerRuntimeCoreDependenciesBase.pipe(
),
),
Layer.provideMerge(layerWorkspace),
Layer.provideMerge(TaskDocuments.layer.pipe(Layer.provide(layerPersistence))),
Layer.provideMerge(ProjectEnrichmentService.layer),
Layer.provideMerge(Layer.mergeAll(NativeAppIconResolver.layer, layerProjectFaviconResolver)),
Layer.provideMerge(layerRepositoryIdentityResolver),
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -1898,15 +1898,15 @@ describe("storage cleanup reports and local file policies", () => {
expect(locked).toMatchObject({
outcome: "failed",
projectPath: repo,
path: worktree,
path: yield* fs.realPath( worktree) ,
threadId: "thread-1",
threadTitle: "Thread",
});
expect(locked?.reason).toContain("Git index is locked");
expect(yield* fs.readFileString(`${worktree}/tracked.txt`)).toBe("original\n");
yield* fs.remove(`${index.trim()}.lock`);
const gitFile = yield* fs.readFileString(`${worktree}/.git`);
yield* fs.writeFileString(`${worktree}/.git`, " gitdir: /missing- git-directory\n" );
yield* fs.writeFileString(`${worktree}/.git`, ` gitdir: ${repo}/. git\n` );
expect((yield* service.runNow).entries[0]).toMatchObject(changed);
yield* fs.writeFileString(`${worktree}/.git`, gitFile);
expect((yield* service.runNow).entries[0]).toMatchObject({ outcome: "removed" });
Expand Down
Loading
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.