Repository navigation
[WIP] Acknowledg Forge - #310
Open
wchilders-nvidia wants to merge 3 commits into
Open
wchilders-nvidia wants to merge 3 commits into
wchilders-nvidia wants to merge 3 commits into
Conversation
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).
As of the initial PR opening there are ~9,750 added lines:
edgtest,edgacknowledg.client)deploy-remote.sh)dev_tools/pylibs/edgacknowledg/forge/uv.lockfilesuv lock --checkRead in this order:
dev_tools/services/acknowledg-forge/README.md, the design overview.forge/__init__.py, the protocols.ingest→db/store→processor→publisher→announcer.Changes to existing code
edgtest:.run_test_envis no longer sourced. Sourcing it wasarbitrary code execution for untrusted PRs. No such files are tracked here.
Does any out-of-tree test home use one?
edgacknowledg.client(all CLIs are affected):invalidand the section keeps serving;The library still supports Python 3.6.
client.test/client.bench: an optionalcommand_prefix(sandboxing for
ifc-dumpandcg_annotate).edgacknowledg.forge.edgdockerregisters the image.acknowledg-deploy.yml: the API URL comes from a repositoryvariable; forge-only changes don't trigger it.
Security boundaries
sandbox.py: everything that touches PR content runs in bwrap:directory;
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.
deploy-remote.shruns 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;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.
Core logic
every push to
main;changes.
(merge-base, head).is in progress, dropped when CI passes.
open PR needs it.
sections are re-added.
models. The test suite passes on PostgreSQL 17 as well as SQLite.
run_attempt, andartifacts. GitLab maps per-job artifacts and URL-encoded project paths, and
is tested only against mocked APIs.
Verification
Verified:
tools, SIGTERM shutdown, credentials, and volume ownership.
systemctl/podman.Not verified:
users/<UID>Quadlet units, PostgreSQL peer authentication, and Ubuntu'sAppArmor user-namespace restriction.
Known limitations
edg-rematerialize-test-runwriteschanges.elist.it. The deploy workflow rebuilds it on any
dev_tools/binordev_tools/pylibschange.