Repository navigation
feat(archer-slack): deploy the Socket Mode collector on the laptop (#2137 S2) - #12763
Merged
Merged
Conversation
added 2 commits
November 23, 2026 01:27
…2137 S2) Package the S1 collector for the flake (interpreter + websockets + launcher.sh, which fetches slack.archer-app-token by name via the fleet secrets route), declare it as a NixOS-managed user service (services.archer-slack-collector, nixos/services/archer-slack), enable it on the laptop host, expose nix build .#archer-slack-collector as the package check, and add the unit's Surface 2b row to the fleet schedule registry in the same change. Design record gains the S2 deployment section. Starts the 3-day parallel run the cutover waits on; the puller and review job are untouched.
…2137 S2) lib/default.nix's _self re-exports each make-* through an explicit inherit list; the first S2 commit defined make-archer-slack but did not list it, so flake.nix's merge failed with 'attribute make-archer-slack missing' (caught by the laptop package build).
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 19 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
S2 of #2137: deploy the Socket Mode Slack collector on the laptop. Design record:
doc/fleet/archer-slack/socket-mode-collector.md(decision 1 — hosting is the laptop via this flake; the sandbox has no systemd user bus and its 2026-10-29 run died with a recycle ~54 minutes in).What's in it
pkgs/fleet/archer-slack/collector/package.nix: the S1 collector with a packaged interpreter (nixpkgs websockets 17.0.1; requirements.txt's 17.3 is the pip pin) pluslauncher.sh, the service entry point: fetchesslack.archer-app-tokenby name viafleet secrets get(value only into the process environment), ensures the store directory, execs the collector.run.shstays the checkout/manual launcher.nixos/services/archer-slack/default.nix:services.archer-slack-collector, a home-manager user service in the pm-stack/lab-tunnel shape. The unit setsARCHER_SLACK_DBto the store path the review job reads (~/workspace/archer-slack/puller/state/archer-slack.db, the laptop-local copy the parallel run writes) andARCHER_WATCH_CHANNELS=C0CBYQR65LL(#alignment only, per Drew 2026-10-28). Restart=on-failure, RestartSec=30.amdgains theservices/archer-slackprofile +services.archer-slack-collector.enable = true.lib.make-archer-slackexposesnix build .#archer-slack-collectoras the package-level check (pm-git-sync: projector redeploy restarts without ensuring node_modules — catch-up pull crash-looped pm-projector on missing @libsql/client #8171 doctrine; includes the_selfinherit-list fix the first build caught).doc/fleet-schedule-registry.mdSurface 2b, same change as the unit (repo rule).Evidence
nix build .#archer-slack-collector→flake does not provide attribute 'packages.x86_64-linux.archer-slack-collector'. Collector tests in this checkout: 7/7 (stdlib).~/tools/fleet-build-lock): package builds to/nix/store/in688y1nyp6sk9wr3yawclmwlpy9v6dn-archer-slack-collector-0.1.0; theamdhost config evaluates with the module enabled and renders exactly the intended unit (ExecStart → that store path; the env above).socket connected,hello received (connections=1)at 2026-11-23T01:35:46Z. Unit active, NRestarts=0. Store created at the laptop path with thecollected_eventstable; 0 events so far — #alignment is quiet; the first event lands with the next channel message.Deployment note (narrow install, stated plainly)
A full
./rebuildhad other work pending, so the live activation used the unit file the module generates (values taken from the evaluated host config) installed directly at~/.config/systemd/user/archer-slack-collector.service— ahead of this PR merging. A later rebuild from a main containing this change takes over that path (home-manager renames the hand file to*.backup) and must preserve: the same unit, the store file (outside home-manager's management), and the verified-live state — re-check the unit and journal after that rebuild, since a bad comeback would break the parallel-run window. Rollback:systemctl --user disable --now archer-slack-collector.service, remove the hand-installed unit file,daemon-reload(the store file stays; it is data).The 3-day clock
The parallel run (S4's window) starts at the hello: 2026-11-23T01:35:46Z → ~2026-11-26T01:35:46Z, collector vs the untouched 15-minute puller. The unit was deliberately not restart-tested after the hello, to keep the window clean; resilience evidence is the in-process reconnect above plus enablement via
default.target.wants.Not in scope / unchanged
The review job, its cadence, and the puller's watermark contract are untouched. Reactions remain event-starved: the app manifest doesn't subscribe to
reaction_addedand lacksreactions:read— a workspace-owner manifest amendment + reinstall, named in the design record; S2 deploys with the subscriptions that exist. S3 (wake gate), S4 (fidelity report), S5 (cutover) remain.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.