Skip to content

chore: post-CLI cleanup — fix Feature.compute, llm exports, cache silence; add CLI docs#6

Merged
thinkall merged 4 commits into
mainfrom
chore/post-cli-cleanup-fixes
May 6, 2026
Merged

chore: post-CLI cleanup — fix Feature.compute, llm exports, cache silence; add CLI docs#6
thinkall merged 4 commits into
mainfrom
chore/post-cli-cleanup-fixes

Conversation

@thinkall
Copy link
Copy Markdown
Owner

@thinkall thinkall commented May 6, 2026

Summary

Post-PR-#5 sweep of the repo. Three real correctness bugs and three documentation gaps:

Bug fixes

# Location Issue Fix
1 featcopilot/core/feature.py Feature.compute called exec(code, {"__builtins__": {}}, ...) so any stored snippet using a Python builtin (len, range, int, sum, ...) raised NameError at compute time. New module-level _SAFE_BUILTINS dict mirroring TransformRule._get_safe_builtins; compute now passes it as __builtins__.
2 featcopilot/llm/__init__.py SyncCopilotFeatureClient was defined in copilot_client.py and used internally but missing from package imports + __all__, while SyncOpenAIFeatureClient / SyncLiteLLMFeatureClient were both exported. from featcopilot.llm import SyncCopilotFeatureClient raised ImportError. Added the missing import + __all__ entry so all three sync clients have a consistent public surface.
3 featcopilot/utils/cache.py Three bare except Exception: pass blocks silently swallowed disk I/O / pickle / JSON errors when on-disk cache entries were corrupted, values were unpicklable, or metadata JSON was truncated. Replaced each with logger.warning(...) so callers can diagnose disk issues / version mismatches from logs; the "cache is best-effort, never crash the caller" contract is preserved.

Documentation fixes

# Location Issue Fix
4 docs/user-guide/cli.md (NEW) + mkdocs.yml The featcopilot CLI added in #5 (info / transform / explain) was undocumented in mkdocs ΓÇö only mentioned in the README. New 220-line CLI doc page covering subcommands, the output contract (stdout=JSON, stderr=failures, exit codes), all flags, the --config example, parquet caveat, and agentic-usage tips. Added nav entry.
5 docs/getting-started/installation.md:82 Sample expected output showed # Output: 0.1.0 but current pyproject.toml is 0.3.7. Updated to # Output: 0.3.7.

Tests

  • tests/test_core.py::TestFeature::test_feature_compute_uses_safe_builtins ΓÇö pins the whitelist (len, range, sum, int, abs, round, min, max).
  • tests/test_utils.py ΓÇö three new FeatureCache regression tests for corrupted .pkl reads, unpicklable values on set, and corrupted metadata JSON, each asserting logger.warning is called via mock.patch on the module logger.
  • tests/test_llm_modules.py::TestLLMPackageExports ΓÇö pins the featcopilot.llm public API: all three sync clients are importable directly AND listed in __all__, with identity checks against the underlying submodule definitions.

Verification

  • Pre-commit: clean.
  • python -m pytest tests/ -q: 912 passed, 2 skipped in 4m 21s on Windows / Python 3.13 (ΓåÆ +6 over main's 906).

Out of scope

Several speculative findings from the audit were intentionally left out:

  • The "gpt-5.2" default model name is the project's chosen identifier in utils/models.py and four LLM clients; changing it would be a behavioral change, not a doc fix.
  • Inline reviewer-flagged tests / benchmark fragility (silent except Exception in benchmarks/simple_models/run_simple_models_benchmark.py) is not on the contract surface and is best handled in a dedicated benchmark hardening PR.

Closes the post-#5 cleanup item; no functional contract changes for end users beyond making Feature.compute actually work for snippets that use builtins.

…ence; add CLI docs

Findings from a post-PR-#5 sweep of the repo:

Bug fixes
---------

1. `featcopilot/core/feature.py` — `Feature.compute` previously called
   `exec(self.code, {"__builtins__": {}}, locals)` so any stored snippet
   that used a Python builtin (`len`, `range`, `int`, `sum`, ...)
   raised `NameError` at exec time, even though the snippet was
   otherwise valid. The fix introduces a curated `_SAFE_BUILTINS` dict
   mirroring `TransformRule._get_safe_builtins` so common idioms work
   without giving the snippet unrestricted access to imports / file I/O.

2. `featcopilot/llm/__init__.py` — `SyncCopilotFeatureClient` was
   defined in `copilot_client.py` and used internally by sibling
   modules but was missing from the package's imports and `__all__`,
   while sister classes `SyncOpenAIFeatureClient` and
   `SyncLiteLLMFeatureClient` were both exported. `from
   featcopilot.llm import SyncCopilotFeatureClient` raised
   `ImportError` even though the class itself was importable from the
   submodule. The fix adds the missing import + `__all__` entry so all
   three sync clients have a consistent public surface.

3. `featcopilot/utils/cache.py` — three bare `except Exception: pass`
   blocks silently swallowed disk I/O / pickle / JSON errors when the
   on-disk cache entry was corrupted, when a value was unpicklable
   (e.g. lambda), or when metadata JSON was truncated. The fix replaces
   each with `logger.warning(...)` so callers can diagnose disk
   issues, version mismatches, and unpicklable values from logs while
   still preserving the "cache is best-effort, never crash the caller"
   contract.

Documentation fixes
-------------------

4. `docs/user-guide/cli.md` — NEW page documenting the `featcopilot`
   CLI added in PR #5 (`info` / `transform` / `explain`
   subcommands, output contract, agentic-usage tips, parquet caveat,
   `--config` example). The CLI was previously only mentioned in the
   README; mkdocs had no nav entry.

5. `mkdocs.yml` — added `Command-Line Interface: user-guide/cli.md`
   to the `User Guide` nav section.

6. `docs/getting-started/installation.md:82` — sample expected output
   updated from `# Output: 0.1.0` to `# Output: 0.3.7` (matches
   current `pyproject.toml` version).

Tests
-----

* `tests/test_core.py::TestFeature::test_feature_compute_uses_safe_builtins`
  — pins the safe-builtin whitelist; covers `len` / `range` /
  `sum` / `int` / `abs` / `round` / `min` / `max`.
* `tests/test_utils.py` — three new `FeatureCache` regression tests
  for corrupted `.pkl` reads, unpicklable values on `set`, and
  corrupted metadata JSON, each asserting `logger.warning` is called
  via `mock.patch` on the module logger.
* `tests/test_llm_modules.py::TestLLMPackageExports` — pins the
  `featcopilot.llm` public API: all three sync clients are
  importable directly AND listed in `__all__`, with identity checks
  against the underlying submodule definitions.

Local: 912 tests pass (full suite), pre-commit clean.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 6, 2026 03:09
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.32%. Comparing base (c204770) to head (e5b7a19).

Additional details and impacted files
@@            Coverage Diff             @@
##             main       #6      +/-   ##
==========================================
+ Coverage   89.24%   89.32%   +0.08%     
==========================================
  Files          38       38              
  Lines        4351     4358       +7     
==========================================
+ Hits         3883     3893      +10     
+ Misses        468      465       -3     
Flag Coverage Δ
unittests 89.32% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0bb637b370

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread featcopilot/core/feature.py Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR is a post-PR-#5 cleanup sweep that fixes three correctness issues (Feature snippet execution, LLM package exports, and cache error visibility) and fills in CLI documentation gaps so the CLI’s public contract is documented and test-pinned.

Changes:

  • Fix Feature.compute to expose a curated safe-builtin whitelist during exec, and add regression coverage.
  • Export SyncCopilotFeatureClient from featcopilot.llm (imports + __all__) and pin the public API via tests.
  • Replace silent cache exception swallowing with logger.warning(...) and add regression tests; add MkDocs CLI page + installation doc version update.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
featcopilot/core/feature.py Adds _SAFE_BUILTINS and uses it in Feature.compute execution environment.
featcopilot/llm/__init__.py Exports SyncCopilotFeatureClient to align sync-client public surface with other backends.
featcopilot/utils/cache.py Replaces silent exception swallowing with warnings on disk cache read/write/metadata failures.
docs/user-guide/cli.md Adds a full CLI documentation page (subcommands, flags, output/exit-code contract, parquet notes).
mkdocs.yml Adds the CLI page to the documentation nav.
docs/getting-started/installation.md Updates the expected version output example to 0.3.7.
tests/test_core.py Adds regression tests ensuring Feature.compute supports common builtins.
tests/test_utils.py Adds regression tests asserting cache failures log warnings (read, write, metadata).
tests/test_llm_modules.py Pins featcopilot.llm package exports and __all__ consistency for sync clients.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread featcopilot/core/feature.py
Comment thread featcopilot/core/feature.py Outdated
Comment thread docs/user-guide/cli.md Outdated
…nct error

Round-1 review on PR #6 raised four threads (3x copilot-pull-request-reviewer,
1x codex). All addressed:

1. **Codex P2 (feature.py:176) — comprehensions/lambdas saw NameError**
   Free variables inside a comprehension or lambda body are resolved
   against the enclosing function's globals, NOT against the caller's
   locals dict passed to `exec`. The previous fix put `df`/`np`/
   `pd` only in `locals` so a snippet such as
   `[df['c'].iloc[i] for i in range(len(df))]` would still raise
   `NameError` and `FeatureSet.compute_all` would silently drop the
   feature. `Feature.compute` now uses a SINGLE shared namespace
   (passing one dict as both `globals` and `locals` to `exec`),
   so comprehensions / lambdas / generator expressions resolve `df`,
   `np`, `pd` and the safe builtins identically to the top-level
   statement scope.

2. **Copilot (feature.py:51) — `_SAFE_BUILTINS` mutation persisted**
   `_SAFE_BUILTINS` was passed to `exec` by reference, so a snippet
   that rebound entries (`__builtins__['len'] = lambda x: -999`)
   could leak the mutation into every subsequent `Feature.compute`
   call in the same process. `compute` now passes `dict(_SAFE_BUILTINS)`
   (a fresh shallow copy) on every call, mirroring
   `TransformRule._get_safe_builtins()` which already returns a fresh
   dict per call. Side effects are now strictly local to the single
   `exec` call.

3. **Copilot (feature.py:179) — misleading error when `result` missing**
   The docstring said `ValueError` would be raised when the executed
   code did not bind a `result` variable, but the implementation
   always surfaced `"No code defined for feature ..."` even when
   `self.code` was clearly present and only `result` was missing.
   The two branches now produce DISTINCT messages:
   - `self.code` empty → `"No code defined for feature ..."`
   - `self.code` present but no `result` → `"Feature '...' code did not produce a 'result' variable. Stored snippet must bind its output to a name called 'result'."`

4. **Copilot (docs/user-guide/cli.md:223) — misleading "by `--config llm_config`"**
   `--config` takes a JSON file path; `llm_config` is a key inside
   that JSON. Reworded the See-also bullet to "provide an `llm_config`
   object inside the JSON file passed to `--config`" and link back
   to the existing Configuration Files section.

Tests added (regression locks):

- `test_feature_compute_resolves_df_inside_comprehension` — list
  comprehension, lambda body, and generator expression all referencing
  `df` / `pd` / `len` / `range` succeed.
- `test_feature_compute_isolates_safe_builtins_across_calls` — runs
  a "poisoner" snippet that rebinds `__builtins__['len']`, then
  asserts a clean follow-up snippet still sees the original `len`.
- `test_feature_compute_distinguishes_missing_code_from_missing_result`
  — pins the two distinct `ValueError` messages.

Local: 915 tests pass (full suite); +3 new tests vs round-0.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@thinkall
Copy link
Copy Markdown
Owner Author

thinkall commented May 6, 2026

Round 1 push at 3cd59a6 addresses all four previously-unresolved threads:

  • Codex P2: Feature.compute now uses a single shared namespace so comprehensions / lambdas / generator expressions resolve df / np / pd correctly via globals.
  • Copilot: _SAFE_BUILTINS is now copied per call so snippet mutations cannot leak between Feature.compute invocations.
  • Copilot: distinct ValueError messages for "no code" vs "code ran but did not bind result".
  • Copilot: CLI doc See-also wording corrected ΓÇö llm_config is described as a key inside the --config JSON file, not as a flag.

3 new regression tests pin each behavior. Local: 915 tests pass (full suite); pre-commit clean.

@copilot @codex please re-review the WHOLE PR (not just the latest commit). Thanks!

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3cd59a699c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/user-guide/cli.md Outdated
Copy link
Copy Markdown
Contributor

Copilot AI commented May 6, 2026

Round 1 push at 3cd59a6 addresses all four previously-unresolved threads:

  • Codex P2: Feature.compute now uses a single shared namespace so comprehensions / lambdas / generator expressions resolve ...

Re-reviewed the full PR (both commits). All changes are correct and the test suite passes (911 passed, 6 skipped locally).

featcopilot/core/feature.py — The single-namespace exec approach is the right fix; comprehensions/lambdas correctly resolve df/np/pd via globals, the per-call dict(_SAFE_BUILTINS) copy prevents cross-invocation mutation, and the two distinct ValueError messages make the two failure modes unambiguous. Five regression tests cover all paths.

featcopilot/llm/__init__.pySyncCopilotFeatureClient is now in both the import line and __all__, consistent with the other two sync clients.

featcopilot/utils/cache.py — All three silent except Exception: pass blocks replaced with logger.warning(...). The best-effort-never-crash contract is preserved; errors are now observable in logs.

docs/user-guide/cli.md — CLI doc is clear and complete. The --config / llm_config wording in See also is accurate.

No issues found. The PR is ready to merge.

Round-2 review on PR #6: Codex P2 noted that the user-guide CLI doc
listed `--leakage-guard` choices as `warn` / `block` / `ignore`
and the `info` JSON sample showed `["block", "ignore", "warn"]`,
but the actual `AutoFeatureEngineer.SUPPORTED_LEAKAGE_GUARDS` set is
`{"off", "warn", "raise"}` (per
`featcopilot/transformers/sklearn_compat.py:136`) and the argparse
parser validates against `sorted(SUPPORTED_LEAKAGE_GUARDS)`. Users
following the doc with `--leakage-guard block` would get an
argparse error rather than the described behavior.

Two doc fixes:
- `"supported_leakage_guards": ["block", "ignore", "warn"]` →
  `"supported_leakage_guards": ["off", "raise", "warn"]` in the
  `info` JSON sample.
- `--leakage-guard` row in the transform flags table now lists the
  three actual values (`warn`, `raise`, `off`) with a short
  description of what each does.

Added `test_cli_doc_leakage_guard_values_match_source_of_truth` which
reads `docs/user-guide/cli.md` and asserts (a) the JSON sample
contains the literal sorted-list of `SUPPORTED_LEAKAGE_GUARDS` and
(b) every valid value appears as a backtick-quoted token AND no
non-existent value (`block`, `ignore`) appears anywhere on the
page. Future drift in either direction (renaming a guard, adding a
new one, removing one) will fail this test fast.

Local: 916 tests pass (full suite); pre-commit clean.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 6, 2026 08:03
@thinkall
Copy link
Copy Markdown
Owner Author

thinkall commented May 6, 2026

Round 2 push at a9c25ec addresses the round-2 Codex P2 thread on docs/user-guide/cli.md: the user-guide had warn / block / ignore for --leakage-guard but the actual supported values are {off, warn, raise}. Doc updated and a regression test added that pins the doc against AutoFeatureEngineer.SUPPORTED_LEAKAGE_GUARDS so any future drift (rename, add, remove a guard) fails fast.

Local: 916 tests pass (full suite); pre-commit clean; CI was green for the previous round-1 push and is currently re-running on a9c25ec.

@copilot @codex please re-review the WHOLE PR (not just the latest commit). Thanks!

Copy link
Copy Markdown
Contributor

Copilot AI commented May 6, 2026

Round 2 push at a9c25ec addresses the round-2 Codex P2 thread on docs/user-guide/cli.md: the user-guide had warn / block / ignore for --leakage-guard but the actual supported values are `{of...

Re-reviewed the full PR (all three commits). All changes are correct and the full test suite passes (912 passed, 6 skipped locally — up 1 from round-2 due to the new regression test).

The round-2 fix in a9c25ec is accurate: docs/user-guide/cli.md now shows ["off", "raise", "warn"] in the info sample and warn / raise / off in the --leakage-guard table row, matching AutoFeatureEngineer.SUPPORTED_LEAKAGE_GUARDS = {"off", "warn", "raise"}. The regression test in test_cli.py::test_cli_doc_leakage_guard_values_match_source_of_truth correctly asserts the JSON fragment and each backtick-quoted value against the live class attribute, and rejects the previously incorrect block/ignore values.

No issues found across the full PR. Ready to merge.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a9c25ec5d9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/user-guide/cli.md Outdated
Comment thread tests/test_core.py Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Comment thread featcopilot/core/feature.py Outdated
Comment thread tests/test_core.py Outdated
…cstring

Round-2 review on PR #6 (4 new threads). All addressed:

1. **Codex P3 (test_core.py:162) + Copilot (test_core.py:168) — broken
   isolation test.** `test_feature_compute_isolates_safe_builtins_across_calls`
   started its attacker snippet with `import builtins`, but
   `__import__` is intentionally NOT in the safe-builtins whitelist,
   so the snippet raised at the first line and the surrounding
   `try/except` swallowed the failure. Result: the test would still
   pass even if `_SAFE_BUILTINS` were passed by reference, so it was
   not actually pinning the per-call-copy contract it claims to
   protect. Rewritten to mutate `__builtins__` directly via the dict
   that `exec` sees as the snippet's builtins source AND assert
   inside the snippet (`len(df) == -999`) that the rebinding took
   effect. Now requires BOTH the in-snippet mutation to succeed AND
   the next call to see the original `len`: a real regression check.

2. **Codex P2 (cli.md:63) — info sample omitted valid choices.** The
   sample showed `supported_engines: ["relational", "tabular", "text",
   "timeseries"]` (missing `llm`) and
   `supported_selection_methods: ["correlation", "importance",
   "mutual_info"]` (missing `chi2`, `f_test`, `xgboost`). The
   sample now lists the FULL sorted set from
   `AutoFeatureEngineer.SUPPORTED_*` and a follow-up paragraph
   clarifies the parquet-conditional behaviour for the I/O format
   arrays. Added `test_cli_doc_info_sample_matches_engines_and_selection_methods`
   which pins both lists against the source of truth.

3. **Copilot (feature.py:156) — misleading docstring.** The previous
   docstring claimed the snippet ran "without giving the snippet
   unrestricted access to imports / file I/O". That's incorrect:
   `pd` is in scope, which means `pd.read_csv` /
   `pd.read_parquet` / `df.to_csv` are all reachable. The fix
   reframes the doc accurately: `__import__` is not in the safe
   builtins (so plain `import foo` raises) but the runtime is NOT a
   security sandbox; stored snippets must come from a trusted source.

Verification

- 917 tests pass (full suite); pre-commit clean.
- The new attacker-isolation test would FAIL if `_SAFE_BUILTINS` were
  passed by reference (the `-999` rebinding would leak into the
  next call's `[len(df)] * len(df)` and produce `[-999, -999, -999]`
  instead of `[3, 3, 3]`); confirmed locally.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@thinkall
Copy link
Copy Markdown
Owner Author

thinkall commented May 6, 2026

Round 2 push at e5b7a19 addresses all four round-2 threads:

  • Codex / Copilot (broken isolation test): the previous version started with import builtins which raised because __import__ is not in the safe builtins, and the try/except swallowed the failure ΓÇö so the test would pass even with reference sharing. Rewritten to mutate __builtins__['len'] directly, assert inside the snippet that len(df) == -999 to prove mutation IS possible, then assert the next clean call still sees len(df) == 3. Real regression check now.
  • Codex (incomplete info sample): listed full sorted SUPPORTED_ENGINES and SUPPORTED_SELECTION_METHODS plus a parquet-conditional follow-up paragraph; added a regression test pinning the JSON sample against the source.
  • Copilot (misleading docstring on imports/I/O): the docstring is now honest ΓÇö __import__ is not provided so plain import raises, but pd/np/df reach pandas file-I/O and dunder attribute access is not blocked, so it is NOT a security sandbox; stored snippets must come from a trusted source.

Local: 917 tests pass (full suite); pre-commit clean.

@copilot @codex please re-review the WHOLE PR (not just the latest commit). Thanks!

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Contributor

Copilot AI commented May 6, 2026

Round 2 push at e5b7a19 addresses all four round-2 threads:

  • Codex / Copilot (broken isolation test): the previous version started with import builtins which raised because __import__ is not in ...

Re-reviewed the full PR (all four commits). All changes are correct and the full suite passes (913 passed, 6 skipped — up 1 from round-3 due to the new test_cli_doc_info_sample_matches_engines_and_selection_methods test).

tests/test_core.py::test_feature_compute_isolates_safe_builtins_across_calls — the rewrite is sound: the attacker snippet mutates __builtins__['len'] directly (no import builtins) and asserts list(poisoned) == [-999] in-test to prove the rebinding actually executed. The clean follow-up call asserting list(clean) == [3, 3, 3] then proves the mutation was not shared. This is a genuine regression check.

docs/user-guide/cli.md — the info JSON sample now shows the full sorted SUPPORTED_ENGINES (including llm) and SUPPORTED_SELECTION_METHODS (including chi2, f_test, xgboost); the parquet-conditional note accurately describes how "parquet" is appended to the format lists.

featcopilot/core/feature.py docstring — the .. note:: block correctly states __import__ is not in safe builtins (so plain import raises), but that pd/np/df expose file I/O and the environment is not a security sandbox; trusted-source requirement is explicit.

No issues found. The PR is ready to merge.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.

@thinkall thinkall merged commit 05b7bf5 into main May 6, 2026
12 checks passed
@thinkall thinkall deleted the chore/post-cli-cleanup-fixes branch May 6, 2026 09:42
thinkall added a commit that referenced this pull request May 6, 2026
PR #5 added the agent-friendly `featcopilot` CLI (`info` /
`transform` / `explain`) ΓÇö a new user-facing surface that warrants
a minor-version bump under semver. PR #6 followed up with three
correctness fixes (`Feature.compute` safe-builtins, `SyncCopilotFeatureClient`
public-API consistency, `FeatureCache` exception logging) and the
new CLI documentation page.

This commit bumps:

- `pyproject.toml::version` 0.3.7 → 0.4.0
- `docs/getting-started/installation.md` sample expected output
- `docs/user-guide/cli.md` `info` JSON sample

The CLI's `info --json` reports the actual installed version via
`featcopilot.__version__` (read from package metadata at import
time), so all three references stay in sync once installed.

Local: `python -m pytest tests/test_cli.py` passes 135/135 with the
bumped version (the `test_info_json_emits_supported_options` and
related tests cross-check `payload["version"] == __version__`).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

4 participants