Skip to content

Introduce Takumi Guard for npm and pip - #730

Merged
takahiro-yamada merged 6 commits into
mainfrom
introduce-takumi-guard-node
Nov 6, 2026
Merged

takahiro-yamada merged 6 commits into
mainfrom
introduce-takumi-guard-node

Conversation

@takahiro-yamada

@takahiro-yamada takahiro-yamada commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Install npm (pnpm) and pip packages through Takumi Guard.

Approach

  • CI uses the organization mode (GitHub OIDC) for pushes and same-repository PRs. If TAKUMI_GUARD_BOT_ID is empty, the setup actions fail, because required: true alone does not reject an empty input.
  • Fork PRs use the anonymous mode (best-effort), because they cannot get an OIDC token.
  • The e2e in-cluster installs (pnpm/pip) use the anonymous mode. Those pods build third-party sample repositories, so they must not get the organization token.
  • Local runs assume Takumi Guard is already configured by the developer. The Makefiles do not set it up.

References

Related PRs

Signed-off-by: takahiro-yamada <takahiro-yamada@cybozu.co.jp>
Signed-off-by: takahiro-yamada <takahiro-yamada@cybozu.co.jp>
@takahiro-yamada takahiro-yamada self-assigned this Oct 26, 2026
@takahiro-yamada
takahiro-yamada force-pushed the introduce-takumi-guard-node branch from e084665 to a41e799 Compare October 26, 2026 11:01
Signed-off-by: takahiro-yamada <takahiro-yamada@cybozu.co.jp>
Signed-off-by: takahiro-yamada <takahiro-yamada@cybozu.co.jp>
@takahiro-yamada
takahiro-yamada force-pushed the introduce-takumi-guard-node branch from a41e799 to 4994acb Compare October 26, 2026 11:10
@takahiro-yamada
takahiro-yamada marked this pull request as ready for review October 26, 2026 11:21
@ystkfujii
ystkfujii requested a balanced review from Copilot October 27, 2026 00:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Runtime bot-ID validation, documented authentication fallback behavior, and anonymous Guard configuration for in-cluster pnpm installs remain unresolved.

4 open issues
What changed in this PR

This PR extends Takumi Guard integration to npm dependencies in CI and pip dependencies in the operator’s in-cluster MkDocs builds.

Changes:

  • Adds a shared pnpm/Node setup action and integrates it into frontend and Tilt CI with OIDC permissions.
  • Marks bot IDs as required in both setup actions.
  • Routes MkDocs package installs through the anonymous PyPI proxy and normalizes Dockerfile keyword casing.
File Description
e2e/​manifests/​manager/​build-mkdocs.sh Sets the Takumi Guard PyPI index for pip installs.
Dockerfile Normalizes AS casing without changing behavior.
.github/​workflows/​frontend.yaml Uses the shared setup action with a bot ID and OIDC permission.
.github/​workflows/​ci.yaml Grants frontend OIDC permission and adds setup for Tilt builds.
.github/​actions/​setup-pnpm-and-node-with-takumi-guard/​action.yaml Introduces shared pnpm, Node, and Guard setup.
.github/​actions/​setup-go-with-takumi-guard/​action.yaml Marks the bot-ID input as required.

Review effort: Balanced

python3 -m venv venv
source venv/bin/activate

export PIP_INDEX_URL=https://pypi.flatt.tech/simple/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@takahiro-yamada Could you please check this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed with 684b782

Signed-off-by: takahiro-yamada <takahiro-yamada@cybozu.co.jp>
Signed-off-by: takahiro-yamada <takahiro-yamada@cybozu.co.jp>
@takahiro-yamada
takahiro-yamada force-pushed the introduce-takumi-guard-node branch from a878cd6 to 6aa2308 Compare November 5, 2026 00:04
@takahiro-yamada
takahiro-yamada merged commit d1bb024 into main Nov 6, 2026
82 of 97 checks passed
@takahiro-yamada
takahiro-yamada deleted the introduce-takumi-guard-node branch November 6, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants