Repository navigation
Contributions, contributor pages, fetch work and the CLI workerP3/r2 engine - #80
Draft
andreimarinescu wants to merge 121 commits into
Draft
andreimarinescu wants to merge 121 commits into
andreimarinescu wants to merge 121 commits into
Conversation
…ecord and its projections
…ion on version rows, reserved contributor slugs
…ad, and the contributors on a tombstone answer
… as a new one and reports what it took out
…ugh the /v1 listener, and the corpus counts they leave alone
A banned, unknown or malformed contributor shows as a community member, and a failing source is never cached.
…d mask One batched read per 30 ids; a document with any member outside the mask is refused.
Free like the page and cached with it. Raw HTML, inline links and reference definitions become text, handles are escaped, and the licence line closes the file.
… at /wiki/style.md The embedded text must hash to the pinned value or the pages do not start. The slugs style, terms and wanted are reserved.
Six sections with their pinned ids, a table of contents and the takedown contact address. New refuses terms that lack a section.
…outes in the edge smoke
…newest contributions through field masks
…mes, fetch counts and earned ledger rows
…title injection, article URLs and ledger rows
…nd a Delayed label for config_error
… and COSIFT_WORK_FRONTIER flags An unset key takes its default, a configured 0 stays 0, and a key outside its range is an error naming it.
…e refused on their own
…e work pool, at most 100 not offered in the last day
…ion with the app's worker and net, and a 2 MiB cap for that path
…every redirect hop
… a browser-header fetchAndExtract that equals it
…unity header and reports codes only
…refused locally when the server would refuse it
…guidance and skip
…h progress as JSON lines
…ainst the real work routes
…and pin the award vector groups to them The pinned hash was the stale copy's own, so a drift could never fail it. The award vectors are a subset of the shared groups: the test now compares them with the pinned copy.
…es to skipped A suspended or unverified account used to leave its clawback unresolved until it was skipped after a week, and the credits came back once the account was restored. A debit needs no verified email, so it now uses the linked community user directly; with no link it keeps waiting for the account and stays pending. Positive awards resolve and expire as before.
…checks The engine's daily ceiling on content checks is shared by every submission, so a single account could spend all of it and hold everyone else's submissions and cited-source pushes until 00:00 UTC. Each community user now has a per-UTC-day count of content checks (COSIFT_COMMUNITY_MODERATIONS_PER_ACCOUNT, 1 to 10000, default 100), kept in the community database so a restart does not reset it. A user who has reached the share has the rest of their pending submissions requeued to the next 00:00 UTC without spending an attempt, while other users' submissions keep dispatching.
…ublic article pages
…h of local indexing
andreimarinescu
marked this pull request as draft
October 16, 2026 15:44
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
What changes
Article contributions
articles:contributescope.origin,contributorsandversion_contributor. Community records keep 20 versions.POST /v1/articles/{id}/revertrestores a kept version as a new one.status=pendingandtier=./v1/contentsreports a document'ssource, and for an attested oneverified_by.Public article pages
/wiki/style(and.md),/wiki/termsand/wiki/wanted./wiki/<slug>.md./llms.txt, with its Caddy route.GET /api/contributions.Fetch work
internal/workpackage: a pool fed by blocked pages, pushed pages and the frontier; leases; attestations grouped by agreement, with the quorum requiring distinct accounts and networks; a server re-fetch after the quorum window; moderation under a daily ceiling; and indexing of the verified text./v1/work/{claim,submit,push,settled}under thework:brokerscope, plus/admin/work-purge,/admin/work-voidandcosift work purge|void.workblock,COSIFT_WORK_ENABLEDandCOSIFT_WORK_FRONTIER.POST /api/work/claimand/api/work/submit: bearer token only, a join check, daily fetch credits for new content, counters and the ceiling alert.COSIFT_COMMUNITY_WORK,COSIFT_COMMUNITY_FETCH_DAILY_CAPandCOSIFT_ENV.CLI worker
cosift contribute -worker [-max-pages] [-duration] [-concurrency].-index-locallynow shares the same fetch and extraction.Community app
COSIFT_COMMUNITY_MODERATIONS_PER_ACCOUNT, default 100), so one account cannot use the whole day's allowance.Docs
ENV.md,COMMUNITY.md,HANDOVER.md,API.md,AGENT-SETUP.md,SHARED-ACCOUNTS.md,README.mdand the cosift skill now describe the above.Every new path is off until its switch is set.
Tests
go test -race ./...passes, 25 of 25 packages.