Board contributions (#365, #366) and the OpenIPC Club: sign in, send from the board panel, stars on review - #378
Conversation
… the repository (#365, #366) The board panel asks a visitor with the board for a boot log or a U-Boot console, and the answer arrives as an issue. The catalogue had nowhere to put it: migration 003's `contributor` source and `contributed_by` were never written, and an owner report needs ipctool's YAML. boards/contributions.yml lists each reviewed contribution as a unit of an existing model, its text under contributions/<unit>/, and the web role applies it on every start, as it does contents.yml: an unchanged unit is left alone, a changed one replaced, a removed one removed with its files, and an entry whose model is not in the catalogue waits for the import that brings it. The text is searchable and counted like any other unit's, its printenv becomes rows, and the panel credits the sender with the issue. The first entry is Anjoy MS-J10 from sansarus: the boot log (#365) and the U-Boot console (#366) of one board, IMX307 on SSC335 (the kernel's INFINITY6B0 SSC009A-S01A) with an 8 MB GD25Q64, stock 3.3.0.2.
…stars on review Owners sent boot logs and consoles as GitHub issues (#365, #366) because the board panel's "Have this board?" ask opened one. The ask is now a form on the panel, and signing in -- optional -- makes what one sends one's own. internal/club holds accounts and sessions: Telegram (the asking browser shows a code, a QR code on a desktop; Start in the OpenIPC bot finishes the sign-in, and the bot later reports each review), GitHub (an active member of CLUB_MAINTAINER_ORG reviews) and an emailed link, each only when configured. The session cookie's path is /api/v1/club: pages stay static and cached, and a visitor who never signs in is sent no cookie. A sign-in is tied to the browser that started it and used once; POSTs from another site's page are refused. Everything about reports stays in internal/reports: a send for a known board needs no ipctool output and may carry a programmer's flash image; report_submissions records the sender and the board they named; a member's reports, their private dumps (to them and maintainers only), the review queue and the stars ledger are its own, guarded like the rest. Stars are written by a review only: +1 per accepted item, +10 per dump the catalogue did not hold, and the negative of each if a published report is rejected afterwards. `openipc reports publish|reject` takes the same path. A published report's text and photos become a contributed unit on its board (boards.ApplyReportUnits), searchable and counted, beside the units contributions.yml lists; neither list removes the other's. Pages: /club (sign-in, then the member's reports and stars), /club/review (maintainers), the send form in the board panel, and the member's stars in the navbar. The nightly purge drops expired sessions and sign-ins.
…nd nothing earned is not amber
…een the navbar's stars and name
… TLS; any other relay must take it
…org's DNS says about it
PR Summary by QodoAdd board contributions and the OpenIPC Club review workflow
AI Description
Diagram
High-Level Assessment
Files changed (50)
|
Code Review by Qodo
1.
|
- A sign-in link opened in a browser other than the one that asked for it (an emailed link, the bot's link after an expired code) signs nothing in by itself: /club names the account and waits for a click. Someone could otherwise ask for a link to their own address, get it opened elsewhere, and collect what that person sends next. - Telegram's Start only claims a sign-in; the bot asks "Sign in as @you?", naming the address and time it was asked from, and the browser is signed in on Yes from the same Telegram account. A start link sent by someone else no longer hands them a session. - A GitHub sign-in proves membership of the maintainers' organisation for seven days; after that, reviewing waits for the next GitHub sign-in. - An email sign-up is named "OpenIPC member", never the address, and a member can change their name on /club; the boards' credits follow. - The stars ledger is a net per part of a report: publishing brings each part to what it earns, rejecting to zero, so a report published again after a rejection earns its stars back (migration 021). - The sender reads the reviewer's note with the decision. - /me sums the ledger instead of reading every report; pending stars come with the submissions list. - Report units: WebP photos are thumbnailed (golang.org/x/image/webp), a unit whose files cannot be written stays as it was and costs only its own report, a report on several boards is a unit on each, and the refresh runs under one advisory lock across processes.
…o waiters cannot starve the pool
… so its first sender keeps it
|
All ten findings from the review are fixed (3e3f7d2, 157c980, 87fca20), each with a test, and validated on dev:
|
Closes #365, closes #366.
Owners sent a boot log and a U-Boot console as GitHub issues because the board panel's "Have this board?" ask opened one. This lands those two, replaces the ask with a form on the page, and adds the OpenIPC Club: optional sign-in to follow what you sent, keep flash dumps private, and collect stars for what is accepted.
#365 and #366 in the catalogue
service/internal/boards/contributions.yml+contributions/<unit>/: reviewed owner material, applied by the web role on every start (likecontents.yml). One unit per entry on an existing model,source=contributor, credited to the sender with the issue as its reference; unchanged units are left alone, changed ones replaced, removed ones deleted with their files./api/v1/boards/search?q=SSC009A),printenvas rows, shown after Anjoy's own unit as "Sent by sansarus · Плата MS-J10: новые материалы #365".The OpenIPC Club
internal/club(migration 019): members, identities (Telegram, GitHub, email), sessions, logins. Session cookie path/api/v1/club, HttpOnly, Secure, SameSite=Lax: pages stay static and cached, and a visitor who never signs in gets no cookie. Sign-ins are bound to the browser that started them and used once; cross-site POSTs are refused./quiet,/loud,/stop. English, Russian, Chinese.read:org): an active member ofCLUB_MAINTAINER_ORG(OpenIPC) is a maintainer.internal/reportskeeps everything about reports (deploytest's rule): a send for a known board needs no ipctool output and may carry a programmer's flash image;report_submissions(sender, board named) and the append-onlyreport_starsledger (migration 020), guarded. Stars are written by a review only: +1 per accepted item, +10 per dump the catalogue did not hold, negated if a published report is rejected later.openipc reports publish|rejecttakes the same path.boards.ApplyReportUnits); neither list removes the other's units./club(sign-in, then "My submissions" and stars),/club/review(maintainers), the send form in the board panel (and the "what's inside" ask), the member's ★ in the navbar. The nightly purge drops expired sessions and sign-ins.location ^~ /api/v1/club/in both vhosts; dev's webhook route skips basic auth (Telegram has no staging password; the bot's secret header guards it).Validated on dev (dev.openipc.org runs 2b2b231)
webber2026, DMARC pass).check-config.shand--seam; new club, report-unit and contribution tests; frontend 608 tests, lint, typecheck.Known gap (not fixed here)
Signing in with Telegram in one browser and GitHub in another makes two accounts; an identity already on one account is not moved to another, so there is no merge yet. Linking from a signed-in browser ("Add another way in") works.
Production steps after merge
openipc-deploy prod <sha>-- migrations 019, 020./srv/www/.env.go-prod:TELEGRAM_BOT_TOKEN(@OpenIPCClubBot_bot) andGITHUB_OAUTH_*(OpenIPC Club) are already there; addCLUB_SMTP_ADDR=172.18.0.1:25.CLUB_SITE_URLdefaults to https://openipc.org.deploy/push-nginx.sh --applyfor the production vhost (dev's was installed by hand from this branch).openipc-static prod <sha>.Host and DNS changes already made (not in this diff): openipc.org SPF fixed (it included itself) and now lists 37.27.251.71; DKIM
webber2026._domainkey;_dmarcp=none;webber-eu.openipc.orgA + SPF; PTR 37.27.251.71 -> webber-eu.openipc.org; exim HELO and DKIM selector on webber-eu.