Skip to content

Fix: Refuse a Kaggle notebook owner that is an email address - #102

Merged
b-re-w merged 1 commit into
developfrom
fix/kaggle-owner-is-a-username
Nov 8, 2026
Merged

b-re-w merged 1 commit into
developfrom
fix/kaggle-owner-is-a-username

Conversation

@b-re-w

@b-re-w b-re-w commented Nov 8, 2026

Copy link
Copy Markdown
Member

Notebook deletes failed with 403 on DeleteKernel because the account's username file held the owner's email address. kaggle kernels delete -y <email>/<slug> names a notebook that does not exist, and Kaggle answers 403. With the real username the same token deleted all three notebooks (measured live on 2026-11-08). PR #101 wrongly blamed the token's permissions.

Changes:

  • letify login kaggle refuses an owner containing @, whitespace or /, naming the profile URL kaggle.com/. Nothing is written.
  • open_channel refuses a stored owner of that shape before any notebook is created, with letify login kaggle <alias> --replace --username <username> (blank answers keep the cookie and token).
  • A 403 on delete now says Kaggle refused <owner>/<slug>, that the owner must be the username and not an email, and the same fix command. The token-permission sentence is gone from code and spec.
  • docs/SPEC.md Kaggle token input and notebook owner, and Deleting the notebook, updated first; the 2026-11-08 measurement now states the real cause.

Tests (written first, red before the fix: 5 failed, then green): login refuses an email, spaced or slashed owner and writes nothing; a stored email owner is refused before any notebook; the 403 warning names the owner rule. tests/test_kaggle*.py and tests/test_tunnel_agent_login.py: 161 passed. Tests matching login: 63 passed, 1 skipped. ruff check letify tests: clean.

Notebook deletes answered 403 because the account's username file held the
owner's email address, so kernels delete named a notebook that does not exist.
Login now refuses an owner containing @, whitespace or a slash, open_channel
refuses a stored one with the fix command, and the 403 delete warning names
the owner rule instead of blaming the token's permissions.
@b-re-w
b-re-w merged commit 353fcea into develop Nov 8, 2026
4 checks passed
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.

1 participant