oliver-zehentleitner / maity

design: follow a person; followers invite without the daily cap; report an invitation as spam

Sign in to report

tsk-sgtnf846er2s Open

Oliver (seq 94845, after req-7bxe2c6g4g9q): "If someone follows me, I may invite them without a cap; others can report the spam. The invitation says where and how to report, maybe simply with a link where you confirm again on maity.team."

Design first (plan note on this card, contract wording for §3.4/§6.27/§16.8/§18, no code), for Oliver's OK before building:

  1. Follow: a human follows another human (public handles). What it gives: at least the right to be invited without the per-invitee cap of tsk-8xsrzjv7f0yr. Decide in the plan: is it visible (followers list on the profile, counts), can it be removed by the followed person, does it notify, what about agents/organisations (probably not in V1).
  2. Invitations: the cap of tsk-8xsrzjv7f0yr does not apply when the invitee follows the inviter.
  3. Report as spam: every invitation by handle carries a "report as spam" action in the inbox item and in the mail (a link that asks to confirm on maity.team). What a report does (lands where §16.8 reports land for the instance admin; repeated reports throttle or block the inviter's invitations), and that a report also declines the invitation.

Boundary: design only; no change to agent joins, registration or roles. Build after tsk-8xsrzjv7f0yr.

Notes

  1. An agent · Nov 8, 2026, 19:08 UTC

    Design, part 1/2: follow a person, and the cap (maity-coder-claude-005#zwhq). No code. For Oliver's OK. Read against docs/api.md §3.4, §6.27, §16.8, §18 on main and the plan of tsk-8xsrzjv7f0yr.

    1. Follow (V1: humans only)

    What it means. "I follow anna" is consent to be invited by anna without the daily cap. Oliver: "If someone follows me, I may invite them without a cap." In V1 that is all it gives: no feed, no notifications of the followed person's activity. Agents and organisations can neither follow nor be followed (not_a_person).

    Routes (a human session; an agent credential is forbidden, humans_only):

    • PUT /people/{handle}/follow: follows; idempotent, 204. An unknown handle is not_found, as GET /people answers. Your own handle is invalid.
    • DELETE /people/{handle}/follow: unfollows; idempotent, 204.
    • GET /me/following: the people I follow, each with {handle, display_name, since}, paged.
    • GET /me/followers: the people who follow me. This is the list an inviter needs: whom they may invite without the cap.
    • DELETE /me/followers/{handle}: the followed person removes a follower. It is silent, and the removed person may follow again. To stop that, the person reports instead (part 2).

    Visibility: private in V1.

    • Only the two people involved see a follow: the follower in following, the followed person in followers.
    • There are no public lists or counts on the profile (§6.27), and GET /people/{handle} gains only following: true|false for the caller, so the button can show "Following".
    • Why: the purpose is permission to invite, not reach; public counts would be a social-network feature nobody asked for, and a public list would show who works with whom.

    Notifications: none in V1. Being followed is not an action against anyone, and a notice per follow would itself be a spam channel. The followed person sees new followers in Profile → Followers.

    Limits: 100 follows per human per day (rate_limited), against scripted mass following.

    Data: follow (follower_id, followed_id, created_at), unique on the pair. Deleting an account deletes its rows both ways. The export (§2.9) contains following and followers (handles and dates).

    2. The cap

    tsk-8xsrzjv7f0yr checks INVITATIONS_PER_INVITEE_PER_DAY in one function, invitation_cap_applies(inviter, invitee). As lotse asked, that is built in tsk-8xsrzjv7f0yr already and returns True there. This card makes it False when the invitee follows the inviter.

    The other limits stay for everyone: 20 per project per hour, and the throttle of part 2. Following the inviter means "you may invite me", not "the project may flood me".

  2. An agent · Nov 8, 2026, 19:08 UTC

    Design, part 2/2: report an invitation as spam.

    3. Where the action is

    • The inbox item (the personal request of tsk-8xsrzjv7f0yr) gets a third action beside Accept and Decline: "Report as spam". It calls POST /reports with {target: {type: "invitation", id}, reason: "spam", text?}.
    • invitation becomes a new §16.8 target type, readable only by the invited person. For anyone else it is not_found, as every unreadable target is.
    • The mail carries "Not expected? Report it as spam" with a link <public>/mail/report-invitation/{token}. This is a §18.6 page, per Oliver "a link where you confirm again on maity.team".
    • The GET page names the inviter, the project and the note, with one button "Report as spam". It changes nothing, so mail scanners open it harmlessly.
    • The POST files the report.
    • The token is §18.6's: purpose report_invitation, bound to the invitation, valid while the invitation is open plus 7 days, single use.
    • No sign-in is needed, because the mail went to the account's verified address. The form cookie and Sec-Fetch-Site rules apply as on the sign-in link page (§2.6.3).

    4. What a report does

    In one transaction:

    1. It declines the invitation (declined_at, as no) and closes the request. The inviter sees a decline and cannot tell it from a plain no, because §16.8 says the reported member is never told that a report exists.
    2. It files a §16.8 report of the new type invitation, with a snapshot of the inviter's handle and id, the project's full_name, the trust, role and note, and the time. It reaches the instance admin as every report does (personal request, inbox).
    3. Admin actions for this type: dismiss, or suspend (the inviter's account, as §16.8 describes). hide and remove are invalid (not_public): an invitation is shown nowhere.

    The automatic throttle.

    • When invitations of one inviter collect spam reports from 3 different people within 30 days, that inviter's invitations by handle are refused for the rest of those 30 days: forbidden, details.reason: invitations_paused, with retry_after. A follower is an exception: their consent stands.
    • An admin who dismisses those reports lifts the pause.
    • The pause itself tells the inviter that reports exist, but not who filed them. That is the unavoidable minimum for a throttle; the alternative, silently dropping the requests, would contradict the plain answers Oliver chose for tsk-8xsrzjv7f0yr.
    • Constants: SPAM_REPORTS_TO_PAUSE = 3, SPAM_PAUSE_DAYS = 30.

    The same inviter again (open question for Oliver). After my report, may this inviter invite me again?

    • (a) Yes, but the throttle counts it. That is the simplest.
    • (b) Recommended: no. My report stops that inviter's invitations by handle to me (invalid, handle: "unavailable"), until I follow them. It reveals no more than the decline already did.

    5. Contract sections

    • §3.4: the cap exemption, and the mail link;
    • §6.27: following on GET /people, plus the follow routes;
    • §16.8: the target type invitation, its actions, and the throttle;
    • §18.6: the page /mail/report-invitation/{token};
    • §18.5: the line in the invitation mail;
    • §2.9: the export.

    Boundary kept: agent joins, registration and roles are untouched.

  3. An agent · Nov 8, 2026, 19:10 UTC

    Design, part 3: aligned with Oliver's follow design of 2026-10-29 (tsk-w9rajk5m96m4, via lotse 94886). This replaces "follow = invite permission only" in part 1. Everything else in parts 1 and 2 stays.

    What a follow is. A small trust relation between two humans. The right to invite without the cap is one of its uses (Oliver, seq 94845). The chat rules are the other, and they belong to tsk-w9rajk5m96m4, designed next:

    • two who follow each other may chat;
    • the followed person may always write to a follower, which makes them follow back;
    • a follower may not write first to someone who does not follow them.

    This card builds only the relation and the invitation rules on it. The follow-back on a first message is the chat card's: this card's data and routes allow it (an internal follow(a, b) that the chat code calls), but nothing here sends a message.

    One direction, same as the chat rule. "The followed person may write to a follower" corresponds to "the followed person may invite a follower without the cap". In both cases the follower consented. The exemption therefore stays: the cap does not apply when the invitee follows the inviter.

    Unchanged from part 1, and consistent with Oliver's design:

    • Private. One sees only whom one follows (GET /me/following) and who follows oneself (GET /me/followers); nobody sees who follows whom otherwise, and there are no counts.
    • Humans only. Agents and organisations neither follow nor are followed (the coordinator's proposal on tsk-w9rajk5m96m4, which Oliver has not confirmed yet; this card follows it).
    • No notification of a follow.

    Removing a follower and blocking.

    • DELETE /me/followers/{handle} (part 1) ends that follow. Under the chat rules it also ends that person's right to be written to first and to be invited without the cap.
    • Blocking ("ends everything, follow included, silently": the coordinator's proposal) is left to the chat card, which needs it for messages too. This card only keeps its data model ready: a block will delete the follow rows both ways.

    The spam report (part 2) stays as written. A report also removes the reported inviter from the reporter's following, if the reporter followed them: a report withdraws the consent that the follow gave.

    Not here: chat requests through a shared project (a per-project setting), retention, and attachments. All of those belong to tsk-w9rajk5m96m4.

  4. An agent · Nov 8, 2026, 19:25 UTC

    Design, part 4: Oliver's answers to req-ne8adzmv0cdw (via lotse 94970), folded in (maity-coder-claude-005). Parts 1–3 stay unless changed here.

    1. Trust level. A follow allows both inviting and writing, as part 3 says. The name is still open, because Oliver is considering "connect" instead; options are with lotse. Routes and contract text use whichever name is chosen, so it is settled before the contract PR.

    2. No follower removal. DELETE /me/followers/{handle} is dropped. A follow ends only when the follower unfollows. For the followed person, the way out of unwanted contact is a spam report. A report still removes the reported inviter from the reporter's following (part 3), because it withdraws the reporter's own consent.

    3. Spam report: approved as in part 2.

    4. Same inviter again: (b), plus "once".

    • Rule: a person who does not follow the inviter can be invited by that inviter by handle only once, across all projects. A further invitation is refused: forbidden, details.reason: already_invited. The hint says that the person can follow the inviter to receive more invitations.
    • A follower is exempt, as from the daily cap.
    • This covers (b) on its own: after a report, the reported inviter cannot invite again, because that invitation already counted. The refusal is the same whether the person reported, declined, accepted or never answered, so it reveals no report.
    • What counts: every invitation by handle the hub has accepted, whatever became of it (open, accepted, declined, withdrawn, expired, reported). Withdrawing and re-inviting gives no second chance; otherwise invite/withdraw loops would mail the person again each time.
    • How "once" is stored: a table per (inviter, invitee) pair of humans, invitation_contact (inviter_id, invitee_id, first_at), unique on the pair, with no project column.
    • It is its own table and not derived from invitation, so the rule survives deleted projects and pruned invitations.
    • A row is written in the same transaction as the invitation, including when the invitee follows the inviter. The rule only applies while the invitee does not follow the inviter: an unfollow after many invitations leaves exactly "already invited".
    • Deleting either account deletes its rows. The inviter's export (§2.9) lists the handles invited and the dates; the invitee's export does not, because it does not show who invited them.
    • The check: one function in tsk-8xsrzjv7f0yr, invitation_refusal(inviter, invitee). It returns None when the invitee follows the inviter, and otherwise the first that applies of already_invited, invitations_paused (part 2) and the daily cap (rate_limited). The 20 per project per hour stays for everyone.
    • Tests:
    • a second invitation is refused, both across projects and after a withdrawal;
    • a follower can be invited repeatedly;
    • after an unfollow the invitation is refused again;
    • deleting either account deletes the row;
    • the refusal is the same after a report as after a decline.

    Order and PRs (follow first, per lotse 94926):

    • PR 1 (this card): the follow relation, its routes, the §6.27 contract, deletion and export. Migration slot 1: table follow.
    • PR 2 (tsk-8xsrzjv7f0yr): invitation by handle with invitation_refusal (the follow exemption and "once"). Migration slot 2: the invitation columns plus invitation_contact.
    • PR 3 (this card): the spam report, the throttle and the mail page. It needs the invitation of PR 2, so it comes after it.
  5. An agent · Nov 8, 2026, 19:28 UTC

    Design, part 5: Oliver's answer to req-f6fjxm353gdx, point 7 (via lotse 94986). This replaces the sentence in parts 3 and 4 saying that "a report removes the reported inviter from the reporter's following".

    A report does not end a follow.

    • When the reporter follows the inviter they report, the report leaves the follow in place and adds a question to the reporter's inbox: "Also stop following {handle}?", with go/no.
    • go unfollows, exactly as DELETE /people/{handle}/follow does.
    • no closes the question and changes nothing.
    • It is a personal request (§7), kind unfollow_after_report, with the reported handle as its subject. It is not public and goes to nobody else.
    • A report from the mail page (§18.6, no sign-in) asks the same question in the inbox, because the mail page has no session to ask in.
    • Without a follow there is no question.
    • While the question is open, the follow stands, and with it the exemptions from "once", from the daily cap and from the throttle.
    • Tests: no follow, no question; a follow plus a report gives a question while the follow stays; go unfollows; no changes nothing; nobody but the reporter can read or answer it.

    This belongs to PR 3 (the spam report). PRs 1 and 2 are unchanged.

    Point 6 (a deleted account's messages stay) concerns the chat card, tsk-w9rajk5m96m4. It does not touch the follow rows: deleting an account still deletes them both ways (part 1).

  6. An agent · Nov 18, 2026, 15:21 UTC

    Handover on release (maity-coder-claude-005#e7y8, successor of zwhq, 2026-11-18; lotse seq 162857). Design only so far, in five notes: parts 1–5, nte-ppm2x1hj0fg3 through nte-zxvzpq8b3njn. They include Oliver's answers to req-ne8adzmv0cdw and req-f6fjxm353gdx. The name ("follow" or "connect") was still open with lotse. The card names branch agent-f/follow, but no such branch exists on origin, so no code was pushed. Planned order: PR 1 (follow relation), then PR 2 in tsk-8xsrzjv7f0yr (invitation_refusal), then PR 3 (spam report, throttle, mail page). Building waits for tsk-8xsrzjv7f0yr.

  7. Lotse · Nov 18, 2026, 20:06 UTC

    Folded in from tsk-w9rajk5m96m4 (closed as duplicate, req-gqt5b2812nej): follow and human-to-human chat. The owner's answers of 2026-11-08 feed tsk-sgtnf846er2s, whose PR 1 of 3 is #1532.