Skip to content

selfdev: point at checkout docs/ because jcode_docs is withheld - #1962

Open
ianalitis wants to merge 1 commit into
1jehuang:masterfrom
ianalitis:fix/selfdev-docs-pointer
Open

ianalitis wants to merge 1 commit into
1jehuang:masterfrom
ianalitis:fix/selfdev-docs-pointer

Conversation

@ianalitis

Copy link
Copy Markdown
Contributor

Problem

In a self-dev session the bundled jcode_docs tool is withheld, but the
selfdev tool description still said "Manage self-dev builds, tests, and
reloads"
with no hint about where documentation lives. Agents working on jcode
itself then tried to consult bundled docs and found nothing callable, which is
the discoverability complaint in #1618 (same root cause as the doc-location half
of #1619).

Source builds do have the docs: jcode_docs is generated with
include!(concat!(env!("OUT_DIR"), "/jcode_docs.rs")) at compile time from the
repository docs/ directory. So in self-dev the checkout is the doc source.

Change

crates/jcode-app-core/src/tool/selfdev/mod.rs

  • description_for(true) now states that the bundled jcode_docs tool is
    withheld in self-dev sessions and points at this checkout's docs/
    directory, noting that bundled docs are built from it.
  • The non-self-dev (on-ramp) description is unchanged.

crates/jcode-app-core/src/tool/selfdev/tests.rs

  • Added selfdev_description_points_at_checkout_docs_where_bundled_docs_is_withheld,
    which asserts the self-dev description names both jcode_docs and docs/,
    and that the on-ramp description does not.

scripts/test_size_budget.json

  • Bumped the tool/selfdev/tests.rs baseline 1460 -> 1480 by exactly the added
    lines, so the ratchet stays honest.

Verification

cargo test --locked -p jcode-app-core --lib selfdev_description
# test tool::selfdev::tests::selfdev_description_points_at_checkout_docs_where_bundled_docs_is_withheld ... ok
# test result: ok. 1 passed; 0 failed; 1722 filtered out

python3 scripts/check_test_size_budget.py reports no violation for
tool/selfdev/tests.rs. Note that this script is already red on origin/master
(60ccebb00) for other tracked files (server/client_lifecycle_tests.rs,
usage/tests.rs, server/remote_tests.rs, tui/app/tests.rs,
scroll_copy_02/part_02.rs) before this change; those reds are pre-existing and
unrelated to this PR. Same caveat for the fmt/clippy -D warnings reds in #1907.

Fixes #1618. Related: #1619.


— Jcode agent (automated triage), on behalf of @1jehuang

In a self-dev session the bundled jcode_docs tool is withheld, so the
on-ramp description claiming documentation is available via that tool sent
agents looking for a tool that cannot be called. Source builds also load
docs from the working tree ($OUT_DIR/jcode_docs.rs is generated from repo
docs/), so the checkout is the right place to look.

Mention that the tool is withheld in self-dev sessions and point at the
docs/ directory of the checkout instead. Add a regression test for the
description split and bump the file's test-size baseline by the added
lines.

Fixes 1jehuang#1618
Refs 1jehuang#1619
@ianalitis

Copy link
Copy Markdown
Contributor Author

Verified this still applies to current master (4bb16b96c).

  • Locally rebased the commit onto 4bb16b96c: clean, no conflicts.
  • cargo test -p jcode-app-core --lib selfdev_description_points_at_checkout_docs_where_bundled_docs_is_withheld → 1 passed.
  • The behaviour it documents is still current: crates/jcode-app-core/src/agent/turn_execution.rs still removes jcode_docs in self-dev mode (lines 712, 722) and still refuses it with "Read the working tree documentation instead" (line 1119). Only the prompt half was missing, which is what this adds.

The red CI on this PR is master drift, not this change. #1964 restores the fmt/clippy/warning-budget gates; once it lands, a re-run here should come back green without a rebase.


— Jcode agent (automated triage), on behalf of @1jehuang

This branch has not been deployed

No deployments
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.

Self-dev mode withholds jcode_docs by design, but the prompt never says so or points at the working tree docs

1 participant