-
-
Notifications
You must be signed in to change notification settings - Fork 23
file not found #715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
file not found #715
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # Contributing to walkerOS | ||
|
|
||
| walkerOS is open source and will remain open source. We believe companies should | ||
| own their data infrastructure. True data ownership only comes when you control | ||
| your data collection. Thanks for considering a contribution, we appreciate them | ||
| all. | ||
|
|
||
| ## Ways to contribute | ||
|
|
||
| - **Report bugs** via | ||
| [GitHub issues](https://github.com/elbwalker/walkerOS/issues) (issue templates | ||
| available) | ||
| - **Suggest features**: open an issue first so we can discuss the approach | ||
| before you invest time in code | ||
| - **Improve documentation**: the docs live in `website/docs/` | ||
| - **Contribute code**: fix bugs, improve packages, or create new destinations, | ||
| sources, or transformers (the `skills/` folder has step-by-step guides) | ||
| - **Help other users**: answer questions in issues and discussions | ||
|
|
||
| ## Getting started | ||
|
|
||
| The easiest setup is the devcontainer, which installs all dependencies and | ||
| tooling automatically. A manual setup works too: | ||
|
|
||
| ```bash | ||
| npm install # Install dependencies | ||
| npm run build # Build all packages | ||
| npm run dev # Watch mode | ||
| ``` | ||
|
|
||
| For the full setup guide, package structure, and verification scripts, see the | ||
| [contributing documentation](https://www.walkeros.io/docs/contributing) and | ||
| [AGENT.md](./AGENT.md), the quick reference for contributors and AI assistants. | ||
|
|
||
| ## Development workflow | ||
|
|
||
| - **Test first.** walkerOS follows test-driven development with Jest. Write the | ||
| test, watch it fail, then implement. | ||
| - **Verify the smallest scope that proves your change:** | ||
|
|
||
| ```bash | ||
| npm run verify:touched -- <package> # One package: typecheck + lint + test | ||
| npm run verify:affected # Everything affected since origin/main | ||
| ``` | ||
|
|
||
| - **Event naming** is `"entity action"` with a space (`"page view"`, not | ||
| `"page_view"`). | ||
| - **No `any`** in production code. If types don't fit, fix the code, not the | ||
| types. | ||
|
|
||
| ## Pull requests | ||
|
|
||
| 1. For anything larger than a small fix, open an issue first and outline the | ||
| approach. | ||
| 2. Keep the PR scoped: one concern per pull request. | ||
| 3. Include tests for the change and make sure verification passes. | ||
| 4. Add a changeset (`npx changeset`) when the change affects published packages. | ||
| Skip it for docs, CI, or internal refactoring. | ||
| 5. CI runs typecheck, lint, and tests on every PR. | ||
|
|
||
| ## Licensing | ||
|
|
||
| walkerOS is licensed under the [MIT license](./LICENSE). By submitting a | ||
| contribution, you agree that: | ||
|
|
||
| - your contribution is provided under the same MIT license that covers the | ||
| project (inbound = outbound), and | ||
| - you have the right to submit the work under this license: it is your own work, | ||
| or you are permitted to contribute it (for example by your employer, if you | ||
| contribute in the course of your employment). | ||
|
|
||
| There is no CLA to sign. If your company's legal team has questions about | ||
| contributing, we are happy to talk to them directly: | ||
| [hello@elbwalker.com](mailto:hello@elbwalker.com). | ||
|
|
||
| ## Questions | ||
|
|
||
| - [Open an issue](https://github.com/elbwalker/walkerOS/issues) | ||
| - [Send an email](mailto:hello@elbwalker.com) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| import { test } from 'node:test'; | ||
| import assert from 'node:assert/strict'; | ||
| import { unified } from 'unified'; | ||
| import remarkParse from 'remark-parse'; | ||
| import remarkStringify from 'remark-stringify'; | ||
| import remarkGfm from 'remark-gfm'; | ||
|
|
||
| const SRC = new URL('../src/remark', import.meta.url).pathname; | ||
| const { default: prependExportContext } = await import( | ||
| `${SRC}/prepend-export-context.ts` | ||
| ); | ||
| const { default: normalizeExportLinks } = await import( | ||
| `${SRC}/normalize-export-links.ts` | ||
| ); | ||
|
|
||
| const INDEX = 'https://www.walkeros.io/llms.txt'; | ||
| const EXPECTED = | ||
| '> Part of the walkerOS documentation. Project overview and full index: <https://www.walkeros.io/llms.txt>'; | ||
|
|
||
| // Mirrors the export pipeline: remark-gfm is on, the site plugins run after the | ||
| // built-ins, then remark-stringify emits the .md file. | ||
| function run( | ||
| markdown, | ||
| plugins = [[prependExportContext, { indexUrl: INDEX }]], | ||
| ) { | ||
| const processor = unified().use(remarkParse).use(remarkGfm); | ||
| for (const p of plugins) { | ||
| if (Array.isArray(p)) processor.use(p[0], p[1]); | ||
| else processor.use(p); | ||
| } | ||
| return String(processor.use(remarkStringify).processSync(markdown)); | ||
| } | ||
|
|
||
| const PAGE = [ | ||
| '# Mapping', | ||
| '', | ||
| 'Transform events on the way to a destination.', | ||
| '', | ||
| '- [Sources](/docs/sources/.md)', | ||
| '', | ||
| '```js', | ||
| 'const a = 1;', | ||
| '```', | ||
| ].join('\n'); | ||
|
|
||
| test('exact line, as a blockquote, at the very top', () => { | ||
| const out = run(PAGE); | ||
| assert.equal(out.split('\n')[0], EXPECTED); | ||
| }); | ||
|
|
||
| test('the index URL is emitted unescaped and machine readable', () => { | ||
| const out = run(PAGE); | ||
| assert.doesNotMatch(out, /\\/); | ||
| assert.match(out, /<https:\/\/www\.walkeros\.io\/llms\.txt>/); | ||
| }); | ||
|
|
||
| test('the page keeps its title, prose, list and code block', () => { | ||
| const out = run(PAGE); | ||
| const body = out.slice(out.indexOf('# Mapping')); | ||
| assert.equal(body.trim(), run(PAGE, []).trim()); | ||
| }); | ||
|
|
||
| test('the note is added exactly once when the transform runs twice', () => { | ||
| const opts = [prependExportContext, { indexUrl: INDEX }]; | ||
| const out = run(PAGE, [opts, opts]); | ||
| assert.equal(out.split(EXPECTED).length - 1, 1); | ||
| }); | ||
|
|
||
| test('re-running over an already prepended export does not duplicate', () => { | ||
| const out = run(run(PAGE)); | ||
| assert.equal(out.split(EXPECTED).length - 1, 1); | ||
| }); | ||
|
|
||
| test('composes with normalizeExportLinks: /.md targets still get rewritten', () => { | ||
| const out = run(PAGE, [ | ||
| normalizeExportLinks, | ||
| [prependExportContext, { indexUrl: INDEX }], | ||
| ]); | ||
| assert.equal(out.split('\n')[0], EXPECTED); | ||
| assert.match(out, /\(\/docs\/sources\.md\)/); | ||
| assert.doesNotMatch(out, /\/docs\/sources\/\.md/); | ||
| }); | ||
|
|
||
| test('the note itself is left alone by normalizeExportLinks', () => { | ||
| const out = run(PAGE, [ | ||
| [prependExportContext, { indexUrl: INDEX }], | ||
| normalizeExportLinks, | ||
| ]); | ||
| assert.equal(out.split('\n')[0], EXPECTED); | ||
| }); | ||
|
|
||
| test('a page with no leading heading still gets the note first', () => { | ||
| const out = run('Just a paragraph.'); | ||
| assert.equal(out, `${EXPECTED}\n\nJust a paragraph.\n`); | ||
| }); | ||
|
|
||
| test('a malformed tree is left alone instead of throwing', () => { | ||
| const transform = prependExportContext({ indexUrl: INDEX }); | ||
| for (const tree of [null, undefined, 'text', 42, {}, { children: 'no' }]) { | ||
| assert.doesNotThrow(() => transform(tree)); | ||
| } | ||
| }); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Limit the CI claim to workflows that run for the changed paths.
Line [59] says that CI runs typecheck, lint, and tests on every pull request. The test workflow ignores Markdown, documentation, and website-only changes. The website workflow runs website build and validation, not these checks. (github.com)
Update the sentence to describe the applicable workflow scope.
🤖 Prompt for AI Agents
Source: MCP tools