From 4d6ad47837d6868e7bb4bbc0e539b5abc01c0aac Mon Sep 17 00:00:00 2001 From: Emma Thorpe Date: Thu, 13 Aug 2026 13:23:58 +0100 Subject: [PATCH 1/2] docs(claude): record how to build and test core-services-cloud locally The repo documents its own build and test commands, but assumes Windows and PowerShell. This captures only the deltas that make them run on this machine: dotnet from nixpkgs, artifactory credentials sourced per command because shell state does not persist between tool calls, and a curl check that distinguishes an auth failure from a code failure, since a rejected token surfaces as a NuGet error that reads like a network fault. Also records the two Docker Desktop leftovers that break the component test environment, and the unleash registration a component test canary needs. --- home/claude/memory/MEMORY.md | 1 + .../claude/memory/wsp_local_build_and_test.md | 76 +++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 home/claude/memory/wsp_local_build_and_test.md diff --git a/home/claude/memory/MEMORY.md b/home/claude/memory/MEMORY.md index c6b9f75..d7ca594 100644 --- a/home/claude/memory/MEMORY.md +++ b/home/claude/memory/MEMORY.md @@ -14,3 +14,4 @@ - [Sandbox prompts](feedback_sandbox_prompts.md) — don't prompt for sandbox-disable or routine read-only shell ops; broaden permissions instead - [Dev clusters disposable](dev_clusters_disposable.md) — Lyra's dev clusters are recreatable; mutate/break freely, no confirmation needed - [Nix shell tooling](nix_shell_tooling.md) — any nixpkgs tool runs ad hoc via `nix run`/`nix shell nixpkgs#`; a missing command is never a dead end +- [WSP local build and test](wsp_local_build_and_test.md) — core-services-cloud on this box: dotnet via nix, artifactory creds from `~/.artifactoryenv` sourced per command, how to tell auth failure from a code failure diff --git a/home/claude/memory/wsp_local_build_and_test.md b/home/claude/memory/wsp_local_build_and_test.md new file mode 100644 index 0000000..d3d1f80 --- /dev/null +++ b/home/claude/memory/wsp_local_build_and_test.md @@ -0,0 +1,76 @@ +--- +name: wsp-local-build-and-test +description: "How to compile and test core-services-cloud locally on Lyra's NixOS/WSL box: dotnet via nix, artifactory creds from ~/.artifactoryenv, sourced per command" +metadata: + node_type: memory + type: reference +--- + +Canonical build/test commands for `core-services-cloud` live in the repo at +`.ai/agents.md` and `.ai/component-tests.md` — read those rather than guessing. +The repo docs assume Windows/PowerShell paths; this box is NixOS under WSL, so +the environment deltas below are what actually make them run. + +**dotnet is not on PATH.** Get it from nixpkgs — see [[nix-shell-tooling]]: + +```sh +nix shell nixpkgs#dotnet-sdk_8 --command dotnet build +``` + +`global.json` pins SDK 8 with `rollForward: minor`, so `dotnet-sdk_8` is the +right attribute. + +**Every restore needs artifactory credentials.** They live in +`~/.artifactoryenv` (mode 0600) as `ARTIFACTORY_READ_ACCESS_USER` and +`ARTIFACTORY_READ_ACCESS_TOKEN`, consumed by `nuget.config`. Shell state does +not persist between tool calls, so source them inside each command: + +```sh +set -a; . ~/.artifactoryenv; set +a +``` + +**Check the credentials before blaming the code.** A failed restore reports +`NU1301: Unable to load the service index`, which looks like a network fault but +is usually auth. Confirm which it is: + +```sh +curl -s -o /dev/null -w '%{http_code}\n' \ + -u "$ARTIFACTORY_READ_ACCESS_USER:$ARTIFACTORY_READ_ACCESS_TOKEN" \ + https://repo.citrite.net/api/nuget/v3/stf-virtual-nuget/index.json +``` + +200 means the credentials are good. 401 means the token is the problem, not the +change under test. `https://repo.citrite.net/api/system/ping` returning `OK` +proves reachability independently of auth. + +**Component tests** need Docker plus the same credentials, and are driven by +`./service.ps1` — PowerShell, so `nix shell nixpkgs#powershell` if `pwsh` is +missing. Log in to the image registry first: + +```sh +echo "$ARTIFACTORY_READ_ACCESS_TOKEN" | docker login stf-virtual-docker.repo.citrite.net \ + --username "$ARTIFACTORY_READ_ACCESS_USER" --password-stdin +``` + +Two Docker Desktop leftovers break this box, both fatal and both easy to miss: + +1. `/usr/bin/docker` is a dangling symlink into an absent Docker Desktop WSL + mount, and it shadows the working NixOS docker inside `pwsh`. The script dies + with `Program 'docker' failed to run ... No such file`. +2. `~/.docker/config.json` sets `"credsStore": "desktop.exe"`, a helper that does + not exist. `docker login` reports success while storing nothing, then pulls + fail with `error getting credentials - err: exit status 1`. Remove the + `credsStore` key and log in again; docker then writes the auth into + `config.json` itself. + +Put the real docker first when invoking anything that shells out to it, and note +`$PATH` must expand _inside_ the nix shell or dotnet drops off the path: + +```sh +nix shell nixpkgs#dotnet-sdk_8 --command sh -c \ + 'export PATH="/run/current-system/sw/bin:$PATH"; dotnet test ...' +``` + +A feature canary used by a component test must also be registered in +`Automation/Component/ComponentTests/src/Citrix.Wsp.Test.Mocks/WspComprehensive/__files/unleash/unleash-test-environment.json`, +or `SetFeatureFlag` fails the test as inconclusive rather than failing loudly. From 7041dfebfa3a04d815fb4687c64d42e1d1ff9145 Mon Sep 17 00:00:00 2001 From: Emma Thorpe Date: Thu, 13 Aug 2026 13:23:58 +0100 Subject: [PATCH 2/2] fix(claude): make the Soviet Engineer style enforce terseness structurally The style asked for terseness in tonal terms only, so a dry register wrapped in headers, tables and a full status recap each turn passed its self-check while being exactly the verbose output the style exists to prevent. Add explicit limits: a default length ceiling, headers only for four or more items, report the delta rather than the accumulated state, and state a caveat once. Replace the self-check with one that tests length and form rather than tone. --- home/claude/output-styles/soviet-engineer.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/home/claude/output-styles/soviet-engineer.md b/home/claude/output-styles/soviet-engineer.md index 2e39715..6866d78 100644 --- a/home/claude/output-styles/soviet-engineer.md +++ b/home/claude/output-styles/soviet-engineer.md @@ -20,6 +20,25 @@ report? If the latter, rewrite. Retain all software-engineering capability and t - Refer to the user as "comrade Lyra" when it reads naturally; do not force it into every line. - No emojis. +## Length and form (the voice fails here first) + +Terseness is structural, not just tonal. A dry register wrapped in report furniture — +headers, tables, a full status recap every turn — is the failure mode, and it passes a +tone-only self-check. Enforce: + +- Default ceiling around 150 words. Longer only when the content genuinely needs it: + a real analysis, a comparison of options, a requested writeup. +- Headers and tables only for four or more distinct items. Two facts are two sentences. +- Report the delta since the last message, never the accumulated state. Assume Lyra + remembers what she was told. +- State each caveat once per session. Repeating a settled limitation is filler. +- Do the obvious next action and report it. Do not present a menu of options for a + decision that has an obvious answer. +- Do not restate the request, or narrate what is about to be done. + +Self-check before sending: is this the delta, at the shortest length that stays accurate? +If it reads like a status report, cut it to the three facts that changed. + ## Scope The persona lives in PROSE ONLY — explanations, summaries, status, discussion. It must NEVER