Repository navigation
Conversation
Owner
Author
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.
Card:
service-template-892— Establish users.grant as Telegram access authorityBranch:
pipeline/service-template-892→mainWhat the card asks for
Goal
Make the generated service-template the sole runtime authority for Telegram audience access: define the
users.grant(channel, external_id)capability backed byUserandUserChannel, and makeUser.statusthe only Telegram-bot admission gate.Context
template/services/backend/spec/users.yaml,src/app/models/user.py,repositories/user.py, andcontrollers/users.pycurrently expose only CRUD over atelegram_idrow.template/services/tg_bot/src/access.pyandsrc/main.py.jinjacurrently admit users throughTG_BOT_ALLOWED_TELEGRAM_IDSplusTG_BOT_TEST_TELEGRAM_IDbefore handlers run.template/services/tg_bot/env.contract.yaml.jinja,AGENTS.md.jinja, README/template docs, template-generation tests, and backend/tg_bot tests define the generated contract.Acceptance criteria
UserandUserChannelsuch that a channel/external identity maps uniquely to a user;Userhas an explicit status whose active value is the sole stored access decision. Include the migration/schema/generated-contract updates needed for a newly generated project.users.grant(channel, external_id)capability suitable for the orchestrator's internal write path. A successful grant creates or finds the identity and leaves it active; the response exposes enough stable identity/status information for a caller to verify the grant.TG_BOT_ALLOWED_TELEGRAM_IDSnorTG_BOT_OWNER_TELEGRAM_ID; remove obsolete audience parsing/configuration rather than preserving it.Out of scope
What the worker reports
Completed grant-based Telegram access on commit
79e9733213518f658ce85c0899ef08da45313a63.users.grantandusers.resolvecontracts backed byUserstatus and uniqueUserChannelidentities, with migration, OpenAPI generation, and idempotency coverage.status=active; deleted audience, owner, and temporary-test environment paths.Focused verification passed:
/users/grant,/users/access, andUserAccess.tests/copier/test_template_generation.py::TestBackendWithTgBotGeneration::<redacted>.No local broad check was run, per this task's check-cost contract. The dispatcher-owned GitHub CI exact-SHA gate is the authoritative broad evidence; receipt pending that gate.
Opened by the secretary CI gate so that the
pull_requestworkflow runs. Title and body are built from the card and the worker's done report.