-
Notifications
You must be signed in to change notification settings - Fork 56
feat(db-sync): reconcile Genie databases safely #2737
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
Changes from all commits
7c688f6
777bb19
49fb7a3
6bb372f
12dce92
f3c7455
972a026
063064c
063b73a
c19578c
7a2cd4b
a0cfc27
3b93bc7
f9b02d9
ff507e3
3fcca50
0f2c799
9711b15
ac3a1d0
d811e1d
e800563
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,15 +46,15 @@ function buildReleasePayload( | |
| } { | ||
| const payload = join(root, 'payload'); | ||
| for (const directory of ['.agents', '.claude-plugin', 'plugins/genie', 'skills/review', 'templates']) { | ||
| mkdirSync(join(payload, directory), { recursive: true }); | ||
| mkdirSync(join(payload, directory), { recursive: true, mode: 0o755 }); | ||
| } | ||
| writeFileSync(join(payload, '.agents', 'plugin.json'), '{}\n'); | ||
| writeFileSync(join(payload, '.claude-plugin', 'marketplace.json'), '{}\n'); | ||
| writeFileSync(join(payload, 'LICENSE'), 'test fixture\n'); | ||
| writeFileSync(join(payload, 'VERSION'), `${version}\n`); | ||
| writeFileSync(join(payload, 'plugins', 'genie', 'plugin.txt'), 'authenticated plugin payload\n'); | ||
| writeFileSync(join(payload, 'skills', 'review', 'SKILL.md'), '# Review\n'); | ||
| writeFileSync(join(payload, 'templates', 'template.txt'), 'template\n'); | ||
| writeFileSync(join(payload, '.agents', 'plugin.json'), '{}\n', { mode: 0o644 }); | ||
| writeFileSync(join(payload, '.claude-plugin', 'marketplace.json'), '{}\n', { mode: 0o644 }); | ||
| writeFileSync(join(payload, 'LICENSE'), 'test fixture\n', { mode: 0o644 }); | ||
| writeFileSync(join(payload, 'VERSION'), `${version}\n`, { mode: 0o644 }); | ||
| writeFileSync(join(payload, 'plugins', 'genie', 'plugin.txt'), 'authenticated plugin payload\n', { mode: 0o644 }); | ||
| writeFileSync(join(payload, 'skills', 'review', 'SKILL.md'), '# Review\n', { mode: 0o644 }); | ||
| writeFileSync(join(payload, 'templates', 'template.txt'), 'template\n', { mode: 0o644 }); | ||
|
Comment on lines
+49
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
node <<'NODE'
const { mkdtempSync, mkdirSync, writeFileSync, statSync, rmSync } = require('node:fs');
const { join } = require('node:path');
const { tmpdir } = require('node:os');
const root = mkdtempSync(join(tmpdir(), 'genie-mode-check-'));
const previous = process.umask(0o077);
try {
const directory = join(root, 'directory');
const file = join(directory, 'file');
mkdirSync(directory, { recursive: true, mode: 0o755 });
writeFileSync(file, '', { mode: 0o644 });
console.log({
directory: (statSync(directory).mode & 0o777).toString(8),
file: (statSync(file).mode & 0o777).toString(8),
});
} finally {
process.umask(previous);
rmSync(root, { recursive: true, force: true });
}
NODERepository: automagik-dev/genie Length of output: 191 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Files matching test name:"
fd -a 'update-command-publication\.test\.ts$' . || true
file="$(fd 'update-command-publication\.test\.ts$' . | head -n 1 || true)"
if [ -n "${file:-}" ]; then
echo "---- outline ----"
ast-grep outline "$file" || true
echo "---- relevant lines 1-180 ----"
sed -n '1,180p' "$file" | nl -ba
fi
echo
echo "Search for tarball/archive creation in this file:"
rg -n "tar|archive|createArchive|package|publish|chmod|chmodSync|mkdirSync|writeFileSync|umask" "$file" || trueRepository: automagik-dev/genie Length of output: 808 🏁 Script executed: #!/bin/bash
set -euo pipefail
target="src/genie-commands/__tests__/update-command-publication.test.ts"
echo "---- lines 40-120 ----"
sed -n '40,120p' "$target"
echo
echo "---- lines 120-260 ----"
sed -n '120,260p' "$target"
echo
echo "---- lines 260-420 ----"
sed -n '260,420p' "$target"
echo
echo "---- search archive/tar/chmod/umask references ----"
rg -n "tar|archive|package|publish|chmod|chmodSync|mkdirSync|writeFileSync|umask|sha256|generate|create|Release" "$target" || trueRepository: automagik-dev/genie Length of output: 7818 Normalize release fixture permissions before archiving.
🤖 Prompt for AI Agents |
||
| writeExecutable( | ||
| join(payload, 'genie'), | ||
| `#!/bin/sh\nif [ "\${1:-}" = "--version" ]; then printf 'genie ${version}\\n'; exit 0; fi\nexit 0\n`, | ||
|
|
@@ -77,7 +77,7 @@ describe('updateCommand publication boundary', () => { | |
| const bin = join(genieHome, 'bin'); | ||
| const fakeBin = join(root, 'fake-bin'); | ||
| const fixture = join(root, 'fixture'); | ||
| mkdirSync(bin, { recursive: true }); | ||
| mkdirSync(bin, { recursive: true, mode: 0o755 }); | ||
| mkdirSync(fakeBin); | ||
| mkdirSync(fixture); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.