Files
zeekayandHanzo Dev 5ac678fd84 no hogs: the person services, the mock's customer, and one enum member
PersonHog was the last of it, and it was not only a name. The package is
personinsights and the types in it are already Person* -- the shipped
descriptor under personinsights_client/proto/generated says PersonService
and the tests say TestFakePersonClient -- but the .proto still declared
PersonHogService. A client dialling one service name and a server built
from a .proto declaring another is not a naming problem, it is a wire
that does not connect; the only reason nobody hit it is that none of
these services runs here yet. Five service declarations now say what the
generated client has said all along.

StreamHog was a second fictional company, invented so a Stripe mock had
someone to bill. This fork already has Hedgebox, in five hundred
fixtures, so the mock bills Hedgebox and there is one made-up company
again instead of two.

REVIEW_HOG was an enum member in three enums that had to agree, whose
value has been `review` since the app was renamed. Only the member said
otherwise.

Every rule is in bin/debrand and every spelling is refused there, so a
fresh upstream import lands on these names and none of them can come
back. Two are named as outstanding rather than refused, with the reason
each is still sayable: hogdesk survives inside applied migrations'
choices lists, where Django compares it in Python and never writes it --
the member is Desk = "desk" and all three tables that store it hold no
rows; sherlockhog keys a service in another repository that still calls
itself that, and renaming our half would classify its traffic as a
product that does not exist.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-13 13:57:50 -07:00

58 lines
2.3 KiB
Protocol Buffer

syntax = "proto3";
package personinsights.lifecycle.v1;
// DeletePersonsRequest identifies the persons to destroy. Arguments are
// already person ids — there is no identity to resolve first, so the RPC
// goes straight into the saga runner.
message DeletePersonsRequest {
int64 team_id = 1;
// insights_person.id values to delete. Max 250 per request.
repeated int64 person_ids = 2;
// Caller-generated operation id (UUID string). Persisted with the
// operation: a retried call carrying the same op_id attaches to the
// existing operation and returns its recorded outcome instead of starting
// a new one, so callers must reuse the op_id across retries.
string op_id = 3;
}
enum DeletePersonOutcome {
DELETE_PERSON_OUTCOME_UNSPECIFIED = 0;
// The person was destroyed (or the recorded outcome of a completed
// operation says it was).
DELETE_PERSON_OUTCOME_DELETED = 1;
// Another live lifecycle operation holds this person's mark; nothing was
// done for this person. Retry after that operation finishes.
DELETE_PERSON_OUTCOME_SKIPPED_CONFLICT = 2;
// No live person row with this id exists in the team.
DELETE_PERSON_OUTCOME_NOT_FOUND = 3;
}
message DeletePersonResult {
int64 person_id = 1;
DeletePersonOutcome outcome = 2;
}
message DeletePersonsResponse {
// Echo of the request op_id.
string op_id = 1;
// One result per requested person id, same order as the request.
repeated DeletePersonResult results = 2;
}
// PersonLifecycle runs person-destroying operations (delete now, merge
// case 3 later) as durable sagas: all saga state lives in the lifecycle_op
// tables on the persons primary, the service itself stays stateless.
//
// Ack semantics: the RPC drives the saga to Completed before responding —
// an OK response means the operation's sync-plane work is committed and the
// owning leaders have produced the death documents. On a crash or timeout
// the caller retries with the same op_id; the retry attaches to the
// existing operation, finishes any incomplete tail steps, and returns the
// recorded outcome. A background sweeper backstops abandoned operations.
//
// Co-served on the identity server, but a separate service so callers are
// insulated from any future split.
service PersonLifecycle {
rpc DeletePersons(DeletePersonsRequest) returns (DeletePersonsResponse);
}