Skip to content

build(deps): bump serde from 1.0.195 to 1.0.196#1568

Merged
jqnatividad merged 1 commit into
masterfrom
dependabot/cargo/serde-1.0.196
Jan 27, 2024
Merged

build(deps): bump serde from 1.0.195 to 1.0.196#1568
jqnatividad merged 1 commit into
masterfrom
dependabot/cargo/serde-1.0.196

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jan 27, 2024

Copy link
Copy Markdown
Contributor

Bumps serde from 1.0.195 to 1.0.196.

Release notes

Sourced from serde's releases.

v1.0.196

  • Improve formatting of "invalid type" error messages involving floats (#2682)
Commits
  • ede9762 Release 1.0.196
  • d438c2d Merge pull request #2682 from dtolnay/decimalpoint
  • bef110b Format Unexpected::Float with decimal point
  • b971ef1 Merge pull request #2681 from dtolnay/workspacedeps
  • 29d9f69 Fix workspace.dependencies default-features future compat warning
  • aecb408 Sort workspace dependencies
  • 1c675ab Merge pull request #2678 from rodoufu/workspaceDependencies
  • dd61963 Adding workspace dependencies
  • 111803a Merge pull request #2673 from Sky9x/msrv-badge
  • 0024f74 Use shields.io's MSRV badges
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.195 to 1.0.196.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.195...v1.0.196)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Jan 27, 2024
@jqnatividad jqnatividad merged commit 9347e4f into master Jan 27, 2024
@dependabot dependabot Bot deleted the dependabot/cargo/serde-1.0.196 branch January 27, 2024 14:13
jqnatividad added a commit that referenced this pull request Apr 20, 2026
Three findings from the review of 514cacc:

1. **Medium — max-tokens regression for dictionary-only runs.**
   The original code left `completion_response` as `CompletionResponse::default()`
   when only the dictionary ran, so `--dictionary --max-tokens=N` with dictionary
   tokens ≥ N never tripped the gate. My `last_completion = data_dict.clone()`
   after the dictionary phase broke that invariant. Dropped the assignment and
   added a comment documenting why — the description/tags/prompt branches
   still overwrite `last_completion` correctly, and dictionary-only runs
   pass through as before.

2. **Low — 4 redundant String allocations per error path.**
   `execute_sql_query_phase` was calling
   `normalized_session_path.map(String::from).as_ref()` five times in error
   branches, each allocating a fresh String just to get `Option<&String>`.
   Bind once at the top of the function and pass `session_path_owned.as_ref()`
   everywhere.

3. **Low — session_len sentinel documentation.**
   `flag_session_len == 0` collapses "user did not set it" and "user set 0"
   into the same default (10). Preserved from pre-refactor behavior but
   worth a comment; added one in `run_prompt_phase`.

13 unit + 64 integration tests pass, clippy clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jqnatividad added a commit that referenced this pull request Apr 20, 2026
* refactor(describegpt): split run_inference_options into per-phase helpers

Decompose the ~875-line run_inference_options into eight focused helpers
while preserving all behavior:

- build_inference_messages (was nested get_messages closure) promoted
  to file-scope free fn.
- run_dictionary_phase
- run_description_phase
- run_tags_phase
- run_prompt_phase (returns a PromptPhaseOutcome struct carrying the
  completion, has_sql_query flag, mutated session state, and the
  system_prompt that execute_sql_query_phase reuses for refinement calls)
- execute_sql_query_phase — extracts the ~400-line SQL-results block
  (file validation, fence extraction, scoresql retry loop, DuckDB/Polars
  dispatch, session tracking)
- finalize_structured_output — JSON/TOON emission at end of run

run_inference_options is now a thin orchestrator: create client, check
model, dispatch phases in order, apply max-tokens gate, route SQL,
finalize output, persist session.

Minor consolidation along the way: get_prompt_file(args)? is called
once at the orchestrator (for base_url) instead of 4 times across the
phases; get_output_format(args)? is called once and passed through
instead of re-computed per phase. Error-ordering is preserved within
the phases; the only visible timing change is that a bad prompt-file
now errors before the first LLM call rather than after the dictionary
phase — arguably better UX (no tokens wasted on failure).

64 integration + 13 unit tests pass, clippy clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* address review #1568: max-tokens regression + alloc-per-error fix

Three findings from the review of 514cacc:

1. **Medium — max-tokens regression for dictionary-only runs.**
   The original code left `completion_response` as `CompletionResponse::default()`
   when only the dictionary ran, so `--dictionary --max-tokens=N` with dictionary
   tokens ≥ N never tripped the gate. My `last_completion = data_dict.clone()`
   after the dictionary phase broke that invariant. Dropped the assignment and
   added a comment documenting why — the description/tags/prompt branches
   still overwrite `last_completion` correctly, and dictionary-only runs
   pass through as before.

2. **Low — 4 redundant String allocations per error path.**
   `execute_sql_query_phase` was calling
   `normalized_session_path.map(String::from).as_ref()` five times in error
   branches, each allocating a fresh String just to get `Option<&String>`.
   Bind once at the top of the function and pass `session_path_owned.as_ref()`
   everywhere.

3. **Low — session_len sentinel documentation.**
   `flag_session_len == 0` collapses "user did not set it" and "user set 0"
   into the same default (10). Preserved from pre-refactor behavior but
   worth a comment; added one in `run_prompt_phase`.

13 unit + 64 integration tests pass, clippy clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(describegpt): remove count, to prevent future doc drift

[skip ci]

* address review #1569: invalidate prompt cache on Fresh + json! micro-fix

Five findings, four of them variants of the same issue:

Four cache-invalidation sites in execute_sql_query_phase skipped
invalidation when cache_type == Fresh. But CacheType::Fresh still
writes the completion into the underlying Disk/Redis cache (see the
second get_*_completion call inside get_cached_completion at ~L2102,
comment on CacheType enum confirms: "Forces fresh API call but still
updates cache"). So a --fresh run that produced unusable SQL (failed
fence extraction, DuckDB execution error, Polars error) left the bad
Prompt response in the cache, to be reused by the next non-fresh run.

Changed the guard at all five sites from
    cache_type != &Fresh && cache_type != &None
to
    cache_type != &None
so invalidation fires whenever caching is active. This is a
pre-existing bug that became more visible after the phase split —
bundled here since it's a one-line correctness fix at call sites
the reviewer pointed to. None of this PR's structural changes affect
when or whether these invalidations fire.

Also taking a perf micro-fix from the review in build_inference_messages:
replaced `json!(messages)` (which re-serializes through the json! macro
even though messages is already Vec<serde_json::Value>) with
serde_json::Value::Array(messages), which is a direct constructor.

13 unit + 64 integration tests pass, clippy clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* address review: --no-cache + Polars .csv writability + TSV output msg

Three new findings from the latest Copilot review:

1. **dictionary_cache_type respects --no-cache.** In run_dictionary_phase,
   `--prompt` + `--fresh` was forcing Disk/Redis for the dictionary
   phase even when cache_type is None (user passed --no-cache). That
   silently re-enabled caching. Now gated on
   `cache_type != &CacheType::None` so --no-cache remains authoritative.
   Pre-existing behavior.

2. **Polars .csv sibling writability probe.** execute_sql_query_phase
   validated only the primary sql_results path, but the Polars path
   renames to `{sql_results}.csv` post-run. A pre-existing read-only
   `.csv` sibling would silently break the rename. Loop over
   `[sql_results_path, sql_results_path.with_extension("csv")]` and
   fail early if either exists read-only. DuckDB writes to the primary
   path so the .csv check is no-op there.

3. **TSV-aware "Output written to ..." status message.** Per-phase TSV
   helpers derive `{filestem}.{kind}.tsv` paths via get_tsv_output_path,
   so "Output written to {output}" is misleading for --format tsv.
   Surface the derivation pattern in the status message instead.

13 unit + 64 integration tests pass, clippy clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant