Skip to content

ignore checkout dir - #38

Merged
alexphelps merged 2 commits into
masterfrom
37-ntk-pull-writes-a-checkout-directory-that-ntk-push-rejects-aborting-the-push-partway
Aug 25, 2026
Merged

ignore checkout dir#38
alexphelps merged 2 commits into
masterfrom
37-ntk-pull-writes-a-checkout-directory-that-ntk-push-rejects-aborting-the-push-partway

Conversation

@alexphelps

@alexphelps alexphelps commented Aug 25, 2026

Copy link
Copy Markdown
Member

Closes #37.

The store rejects uploads to checkout/, so ntk push and ntk watch no longer select it: checkout/**/*.html is removed from GLOB_PATTERN. ntk pull still downloads the directory.

Comment thread ntk/command.py Outdated
Comment thread tests/test_command.py Outdated
Comment thread tests/test_command.py
os.makedirs('templates')
open('checkout/checkout.html', 'w').close()
open('templates/index.html', 'w').close()
self.assertEqual(self.command._get_accept_files([]), [os.path.abspath('templates/index.html')])

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: _get_accept_files runs an unmocked glob.glob over the real filesystem. The assertion _get_accept_files([]) == [abspath('templates/index.html')] only holds because the surrounding TemporaryDirectory is empty besides checkout/ and templates/.

If anyone ever adds another file under e.g. assets/, configs/, layouts/, partials/, locales/, or sass/ inside the tempdir, or runs this test in a non-empty CWD without the os.chdir (e.g. due to a setUp change), the test will fail with a confusing diff. More importantly, the test does not actually demonstrate that checkout/ is the only thing being filtered — it would also pass if GLOB_PATTERN excluded templates/. Recommend patching ntk.command.glob.glob (as done in nearby tests) and asserting checkout/checkout.html is excluded explicitly.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 0

The incremental diff (de00a04..5f68993) removes the checkout-skip filter in _pull_templates and the test_pull_command_skips_checkout_directory test, plus a small README wording tweak. The two previous SUGGESTIONs that flagged the now-removed filter and its brittle log-message assertion are no longer applicable — their referenced lines are gone. The pre-existing WARNING on tests/test_command.py:424 (_get_accept_files unmocked glob.glob) lies on a line unchanged in this incremental slice and is not re-raised here.

Files Reviewed (3 files)
  • README.md - 0 issues
  • ntk/command.py - 0 issues
  • tests/test_command.py - 0 issues
Previous Review Summary (commit de00a04)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit de00a04)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 2
Issue Details (click to expand)

WARNING

File Line Issue
tests/test_command.py 459 test_get_accept_files_skips_checkout_directory runs unmocked glob.glob over a real tempdir; the assertion only holds because the tempdir is otherwise empty. Fragile if other GLOB_PATTERN directories ever get populated or if os.chdir is skipped.

SUGGESTION

File Line Issue
ntk/command.py 113 New checkout filter indexes template['name'] without .get(...); an error-shaped response (e.g. {"detail": "Not found"}) would raise KeyError instead of being silently skipped.
tests/test_command.py 338 assertIn('... Pulling 1 files from theme id 1234', ''.join(logs.output)) is a brittle substring + grammar-coupled assertion; a copy-edit or numeric change will break it.
Files Reviewed (5 files)
  • README.md - 0 issues
  • ntk/command.py - 1 issue
  • ntk/conf.py - 0 issues
  • setup.py - 0 issues
  • tests/test_command.py - 2 issues

Fix these issues in Kilo Cloud


Reviewed by minimax-m3 · Input: 23.3K · Output: 2.9K · Cached: 240.6K

@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@alexphelps
alexphelps merged commit 97c0dae into master Aug 25, 2026
16 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.

ntk pull writes a checkout/ directory that ntk push rejects, aborting the push partway

1 participant