Repository navigation
[WIP] Acknowledg Forge - #310
Open
wchilders-nvidia wants to merge 1 commit into
Open
wchilders-nvidia wants to merge 1 commit into
wchilders-nvidia wants to merge 1 commit into
Conversation
wchilders-nvidia
force-pushed
the
acknowledg-forge
branch
from
October 21, 2026 02:23
0785dec to
172bd54
Compare
…orges with AcknowlEDG []
wchilders-nvidia
force-pushed
the
acknowledg-forge
branch
from
October 21, 2026 02:33
172bd54 to
1113888
Compare
wchilders-nvidia
added this pull request to stack #333
October 21, 2026 02:45
Collaborator
Author
|
Here's a settled storage breakdown based on current PRs: and a high level overview of the directory structure ( |
This branch has not been deployed
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.
Adds acknowledg-forge, a service that keeps an AcknowlEDG review alive for
each open GitHub or GitLab pull request:
It can also comment on the PR when results change. The PR ships the service
as a public container image and deploys it from CI.
Initial drafts for GitHub and GitLab support are both included, primarily to ensure that the core logic is sufficiently abstract that this can conceptually be used with different software forges to allow downstream repositories (of various former EDG customers -- that may be in a variety of different software forges) to also leverage the software for their internal processing.
The code primarily authored by Claude and is at this point very lightly reviewed (mostly at the system configuration level). I'll be making my way through it myself, but wanted to get this up so others can start getting eyes on it.
This will be an important service for us as we start to try and process some of the larger PRs that have broader testing impact (e.g., #201).
Stacked on #332, whose commit is the first one here. This PR's change is
the second commit, Initial implementation of AcknowlEDG Forge, which is all
this description covers.
The second commit adds ~15,250 lines:
edgtest,edg-rematerialize-test-run,edgdocker, AcknowlEDG deploy/packaging)compose.yaml, deploy helper, host runtime scriptdeploy-remote.pyruns as root)sandbox.py,local.pydev_tools/pylibs/edgacknowledg/forge/(the rest)README.md,SANDBOXING.md)uv.lockfilesuv lock --checkRead in this order:
dev_tools/services/acknowledg-forge/README.md, the design overview anddeployment, then
SANDBOXING.md, the security model (with diagrams).compose.yaml: the four containers, what each mounts, and their networks.forge/__init__.py, the protocols.ingest→db/store→processor→publisher/client→publisher/server→publisher/pool→announcer.runner/(roles,server,client),sandbox.py,and the deploy helper and host script (
deploy-remote.py,prepare-runtime.sh).Changes to existing code
edgtest:.run_test_envis no longer sourced. Sourcing it was arbitrary codeexecution for untrusted PRs. No such files are tracked here.
Does any out-of-tree test home use one?
.rt.tar.gz) refuses link members instead offollowing them.
edg-rematerialize-test-run: handles new tests and theirrecordings, takes configurations from recording names, reports
NO PREVIOUS OUTPUTas edgy does, and writeschanges.elist(so Test -Changes is served).
edgdockerregisters the image.edgacknowledg.forge;forge-only changes don't trigger
acknowledg-deploy.yml; the README linksthe forge.
Security boundaries
A deployment is four Docker containers from one image (
compose.yaml); seeSANDBOXING.mdfor the full model.servicebuild;publishbuilderedg-rematerialize-test-runonlybuild-staging/build(internal)publisherpublish,tools(internal); AcknowlEDGtoolsifc-dump,cg_annotateonlytools(internal)Containers: non-root, no capabilities,
no-new-privileges,read-only root file systems, a bounded tmpfs
/tmp, memory and processlimits, Docker's default seccomp profile (no user namespaces). Only the
webhook port is published, and only on the host's
127.0.0.1, for areverse proxy.
Networks pair each client with its server and nothing else; internal
networks have no route out. Connections carry no credentials of their own,
so the networks are the boundary:
test_containers.pychecks every pairing.Runners (
runner/): each role's allowed commands, roots, andvariables are fixed in code (
runner/roles.py), the same with or withoutcontainers. Absolute paths outside the roots are refused; the environment is
cleared; a command's process group is killed when it ends, times out, is
cancelled, or its connection goes; between commands, stray processes are
killed and
/tmpemptied.Builds write only to
build-staging/; the service checks what waswritten (no links, no hard links) before renaming it into the review.
Publisher: the server only manages sections. Every reviewer request
is answered in a pool process (round-robin, 4 by default) that builds the
section's handler, answers, and drops it. A process that misses the
request's deadline (150 s) is killed with whatever it started and replaced,
as is one that exits; the reviewer gets the client library's failure reply.
The AcknowlEDG API key reaches it over its connection, never a file or the
environment.
workspace.py:decompressed size (including inner
.rt.tar.gzfiles);Webhooks:
http.py: artifact downloads that redirect to storage don't sendcredentials. They're size-capped.
Comments contain no PR-supplied text.
Host: systemd decrypts the credentials;
prepare-runtime.sh(root,ExecStartPre) copies them to/runfor the service container only.deploy-remote.pyruns as root, through sudo, and is installedby an admin:
ghcr.io/edgcpp/acknowledg-forge@sha256:…, path-freews(s)/http(s)URLs, andacknowledg-forge-*service names;<service>.deploy.env, pulls the image,restarts the unit, and removes only that repository's unused images.
What can someone holding the deploy key do? Intended answer: deploy
another image published from this repository.
The publish job has no access to environment secrets, and the image
contains no credentials or configuration.
Deliberate trade-offs (documented in
SANDBOXING.md):reaches the host as root.
compromises one could affect later commands in it (mitigated by the stray
cleanup, read-only file systems, no network, and the service's checks).
Core logic
every push to
main;changes.
(merge-base, head).is in progress, dropped when CI passes.
open PR needs it.
(
PublisherClient) to the publisher server, which gives each connection itsown
AcknowledgPublisher(one batch connection to AcknowlEDG, read-onlysections, dropped sections re-added). If the connection goes, or a request
goes unanswered for 15 minutes, the client reconnects and serves every
review again.
models.
run_attempt, andartifacts. GitLab maps per-job artifacts and URL-encoded project paths, and
is tested only against mocked APIs.
ACKNOWLEDG_FORGE_UNSANDBOXED=1, localdevelopment only): the service runs the runner and publisher servers itself
on
127.0.0.1, so the control flow is the same but nothing is confined (forsingle-user machines).
Verification
Verified (locally):
builder runner server;
server, including reconnecting and replaying;
the deploy helper's argument checks.
5.6): each container's user, capabilities, mounts, and the networks it can
reach; the webhook port on loopback only; builds and tools reached through
their runners; the publisher running its server and 4 pool processes.
against an unreachable forge: it starts, and reaches its runners and the
publisher.
Not verified:
real artifacts through the containers, and the workflows running on GitHub
(including the new container job on
ubuntu-24.04andubuntu-26.04);prepare-runtime.shas root, encrypted credentials,deploy-remote.pyagainst a real Docker, and PostgreSQL (the suite passed on PostgreSQL 17
before the container rework; not re-run since).
Known limitations
it. The deploy workflow rebuilds it on any
dev_tools/binordev_tools/pylibschange.backtracks on long
.eloglines, uncapped command output). The process poolbounds each request to its deadline, so this can't stall the service; fixes
for the inputs themselves will follow separately.