#prompting and using your current module
1 messages · Page 1 of 1 (latest)
trying to get this setup to work. Here's the code at the moment: https://github.com/kpenfound/hello-dagger/pull/2/files#diff-4dd1e2eb1e1e6c8b3af016607bc4ebdaa89bb54c988875e5bf1a8a616dd0f490R84
The goal is to use the current module's Test function with an agent since that's the best selling point of using dagger for agents in a daggerized project
I think there's 3 options here
- self calls. Can workaround this today with privileged env (maybe?)
- interfaces. Messy. It's what I do today in greetings-api https://github.com/kpenfound/greetings-api/blob/main/.dagger/workspace/main.go#L11
- Circular dependency. Probably not an option
in the PR I linked above. gpt-4.1 is consistently calling Test incorrectly from the privileged env. Maybe it's a privileged thing or maybe an optional argument thing, but here's what it's calling:
:robot: test(HelloDagger: HelloDagger#1, source: Workspace#2)
@bright plover have you tested with privileged envs much?
not much, no - there isn't an eval for it, it's mostly thought of as a driver for shell still
looks like it eventually figured it out? https://v3.dagger.cloud/kpenfound/traces/0fdf4f161cc6626e261d29ce87205406
(also trace links are always 1000% preferable to individual snippets)
yeah eventually. I need to figure out the prompting to get it more consistent. But also without making the prompt leak too much dagger implementation ideally
hmm in this case it seems like it's not aware of contextual dir args: https://v3.dagger.cloud/kpenfound/traces/0fdf4f161cc6626e261d29ce87205406?span=44ec0dd442c2ab43&logs
also that description is pretty unhelpful, it's describing the DirectoryID type instead of the arg - which I guess has no description, but might be better to just omit it in that case
oh I totally glossed over the fact that I didn't have a description on that. I'll update that now
ok that was way worse lol but maybe just some random chance. I'll try a few more times https://v3.dagger.cloud/kpenfound/traces/61d809b9c08ff0fc38ae073f6bda112f#6f20ad827332775d
hmm i wonder if this is specific to contextual dir args too
like on paper it looks like it's doing the right thing
looking into it!
Thanks I'll keep trying prompts!
yeah if I drop the defaultPath it works great
looks like it's a bug with handling optional IDs
@young plover here's a fix if you wanna give it a go - still have to write an eval, but seems like it's not exploding: https://github.com/dagger/dagger/pull/10254
nice! building
Yeah looks good. Some other things were behaving weird but I don't know if that's related or not.
good: https://v3.dagger.cloud/kpenfound/traces/f4a3d60aa2452e3e353333e1efe03b84
weird: https://v3.dagger.cloud/kpenfound/traces/b2c5a4e5e2af045eaf7122628c1e8839
didn't call test x 2: https://v3.dagger.cloud/kpenfound/traces/11c5f0a4156b7b52aea86573cdb16927 https://v3.dagger.cloud/kpenfound/traces/61c1fd6a609cd1ec870c5b376733d49c
weird + ?debug is a bit more interesting: https://v3.dagger.cloud/kpenfound/traces/b2c5a4e5e2af045eaf7122628c1e8839?debug - it's repeating the same calls over and over?
not the first time i've seen that behavior pattern
wonder what causes it 
should probably disable the HTML sanitization for our JSON responses (<> => unicode escapes): {"result":"/* color palette from \u003chttps://github.com/vuejs/theme\u003e *
it's also possible these JSON responses actually just suck for long content
Yeah I've seen that a few times too. It's weird that if I just start a new session and try again it'll have no problem with the same file
@young plover pushed removal of {"result":"..."} wrapper if you wanna give that a go
may have gotten stuck, haven't seen this behavior before: https://v3.dagger.cloud/kpenfound/traces/a9abf9fe005c0de80d6f183109783cec#3d6f8351a75df57b
maybe it's dead? time="2025-04-23T19:27:36Z" level=error msg="healthcheck failed fatally" client_hostname=dagger client_id=2eqh7lr8zyi25xc4svaz4d1n6 session_id=xgoeh5w47ckci3s89k7mxqcp7
another weird one. got it right the second attempt: https://v3.dagger.cloud/kpenfound/traces/5379823d506e08c5fe97d2caff9ae831#7dbf1ef4a2c42c2c
it did it again. Just trying to pass the Workspace as a Directory https://v3.dagger.cloud/kpenfound/traces/31a03615475c5b46b85f38bd9b4401b5
lol for me it tends to call itself and deadlock
@young plover pushed some more tweaks if you wanna try
- Validate types earlier to avoid that giant error barf
- Add a default description for ID args
sweet, rebuilding
rebuilds are so fast on my new setup 🔥
also tried to call itself lol https://v3.dagger.cloud/kpenfound/traces/e019c83d617e920bf3aacdef43ec9ab9#7d8a7dc33c27dcfe
this run was solid: https://v3.dagger.cloud/kpenfound/traces/0884f10de361058481a656afe41f43c5#c4f37d86058dfe7a
weird, it's still getting the JSON wrapped response - https://v3.dagger.cloud/kpenfound/traces/0884f10de361058481a656afe41f43c5?span=3e2780ad46c52b93
still HTML escaped too - you sure this is with a new engine?
> _EXPERIMENTAL_DAGGER_RUNNER_HOST=docker-container://dagger-dev ~/bin/dagger version
dagger v0.18.5-250423135820-750eb1f18adf (docker-container://dagger-dev) darwin/arm64
> docker exec dagger-dev dagger version
dagger v0.18.5-250423135820-750eb1f18adf (unix:///run/dagger/engine.sock) linux/arm64
looks OK in my traces: https://v3.dagger.cloud/dagger/traces/c3484fefe58554c4f86ee62dce5442d5?span=5a1b3a27424fcdae
How did you get to that json wrapped one? This is the only one I could see https://v3.dagger.cloud/kpenfound/traces/c0faa4bfea14cf5e0b1bb57e67f2a590?span=7902f8d512656f1f
wait wrong link this one https://v3.dagger.cloud/kpenfound/traces/0884f10de361058481a656afe41f43c5?span=7e5f95dc40167e54
I added ?debug and then clicked into it (which removed ?debug but still worked)
maybe I'm doing something wrong but when I add ?debug I'm not actually getting the debug view 🤔 Its worked fine before though
oh duh, i am dumb
&debug vs ?debug? 😛
yup lol
again trying to use a Workspace as a Directory https://v3.dagger.cloud/kpenfound/traces/19d88e0e3bd2d01b489669c0fc919a09#9eeb26cd15765125
still looks like an old engine to me
so weird, what could cause that? the build version looks correct
this is how i'm building: https://github.com/kpenfound/dotfiles/blob/master/.zshrc#L148
hmm maybe it didn't fetch the updated ref https://v3.dagger.cloud/kpenfound/traces/9163ee5b28ca0d85733735149c13e127
but then it shouldn't have the new commit in the build
oh right so I've done 3 builds but there's only 2 commits on that PR. Did you push the last change?
i was pushing to my fork instead of upstream
my bad
that explains it 🤣 rebuilding now
looks good https://v3.dagger.cloud/kpenfound/traces/4d5da715f211ac64a5100ea6024a5c8d#1258c1154fc6f499?debug